appsly-android-rest icon indicating copy to clipboard operation
appsly-android-rest copied to clipboard

add overriable method for Callback.onFailure

Open lucianobustos opened this issue 10 years ago • 0 comments

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) {

        }
    });

lucianobustos avatar Dec 02 '14 21:12 lucianobustos