Skip to content

Commit 756e0d8

Browse files
committed
[FIX] After Odoo 10.0 When credentials are not valid, server throw traceback.
API handles specific error only, now it will handle all type of errors from server
1 parent 9506b59 commit 756e0d8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/src/main/java/oogbox/api/odoo/client/ConnectorClient.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,13 @@ public void onResult(OdooResult result) {
231231
@Override
232232
public boolean onError(OdooErrorException error) {
233233
switch (error.errorType) {
234-
case ProgrammingError:
235-
case SessionExpired:
236-
if (callback != null)
237-
callback.onLoginFail(AuthError.AuthenticationFailed);
238-
break;
239234
case InvalidDatabase:
240235
if (callback != null) callback.onLoginFail(AuthError.DatabaseNotFound);
241236
break;
237+
default:
238+
if (callback != null)
239+
callback.onLoginFail(AuthError.AuthenticationFailed);
240+
break;
242241
}
243242
return true;
244243
}

0 commit comments

Comments
 (0)