How to handle error in Retrofit 2.0
I want to handle error in Retrofit 2.0 Got e.g. code=404 and body=null , but errorBody() contains data in ErrorModel ( Boolean status and String info ). This is errorBody().content : [text=\n{"status":false,"info":"Provided email doesn't exist."}] . How can I get this data? Thank for helping me! This is my code for Retrofit request: ResetPasswordApi.Factory.getInstance().resetPassword(loginEditText.getText().toString()) .enqueue(new Callback<StatusInfoModel>() { @Override public void onResponse(Call<StatusInfoModel> call, Response<StatusInfoModel> response) { if (response.isSuccessful()) {