@ Override public Response intercept ( Chain chain ) throws IOException { final Request request = chain . request ( ) ; final Response response = chain . proceed ( request ) ; if ( ! response . isSuccessful ( ) ) { throw new CMAHttpException ( request , response ) ; } return response ; }
Intercepts chain to check for unsuccessful requests .