Retrofit 2.0 - How to get response body for 400 Bad Request error?
问题 So when I make a POST API call to my server, I get a 400 Bad Request error with JSON response. { "userMessage": "Blah", "internalMessage": "Bad Request blah blah", "errorCode": 1 } I call it by Call.enqueue(new Callback<ResponseBody>() { @Override public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) { //AA } @Override public void onFailure(Call<ResponseBody> call, Throwable t) { //BB } } However the problem is that once I get the response, onFailure() is invoke so