appsly-android-rest
appsly-android-rest copied to clipboard
add overriable method for Callback.onFailure
Some times the json service return erros and/or wrong serialized data. You need to be able to handle that unexpected response in the onFailure CallBack.
api.getProdByName(name, new Callback<Response>() {
@Override
public void onFailure(Exception ex) {
//some nasty failure happened here
}
@Override
public void onResponse(Response<Response> response) {
}
});