xebia-functional / appsly-android-rest

An Android client library for RESTful based web services.
209 stars 51 forks source link

add overriable method for Callback.onFailure #53

Open lucianobustos opened 9 years ago

lucianobustos commented 9 years ago

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

        @Override
        public void onFailure(Exception ex) {
            //some nasty failure happened here
        }

        @Override
        public void onResponse(Response<Response> response) {

        }
    });