static boolean isErrorStatus ( HttpResponse httpResponse , HttpResponseDecodeData decodeData ) { final int [ ] expectedStatuses = decodeData . expectedStatusCodes ( ) ; if ( expectedStatuses != null ) { return ! contains ( expectedStatuses , httpResponse . statusCode ( ) ) ; } else { return httpResponse . statusCode ( ) / 100 != 2 ; } }
Checks the response status code is considered as error .