I am using the (I guess) quite popular library from LoopJ (https://github.com/loopj/android-async-http) to make GET and POST requests. Everything if working fine, but when it comes to cookie-handling I got some errors. Occasionally the POST-Login request in my app fails for no reason. In that case, the onFailure-method of the POST request is called correctly:
@Override
public void onFailure(Throwable error, String content) {
Log.e("custom onFailure POST", error.getMessage());
cb.onTaskComplete("LOGIN_FAILED");
}
The strange thing is, that both "Throwable error" and "String content" are NULL-objects. That makes it really hard to analyze to problem of logging the user in into my app. Can someone tell me, how to get the source of the failure? Are there other methods I can implement to get a better fail-repost from the request?