I\'m using the latest (as of now 2.0.0-beta4) version of Retrofit. When receiving 200 OK code from server, everything is working fine. But I want to deal with not OK respons
Found the answer in futurestud.io blog comments:
Changed the APIError.java to this:
public class APIError {
Error error;
public Error getError() {
return error;
}
public static class Error {
String name;
int status;
String message;
int statusCode;
String code;
String stack;
public String getName() {
return name;
}
public int getStatus() {
return status;
}
public String getCode() {
return code;
}
}
}