protected void skipResponseStatusExceptionParsing ( String json ) throws ResponseErrorJsonParsingException { // If this is not an object, it's not an error response. if ( ! json . startsWith ( "{" ) ) { throw new ResponseErrorJsonParsingException ( ) ; } int subStrEnd = Math . min ( 50 , json . length ( ) ) ; if ( ! json . substring ( 0 , subStrEnd ) . contains ( "\"error\"" ) ) { throw new ResponseErrorJsonParsingException ( ) ; } }
checks if a string may be a json and contains a error string somewhere this is used for speedup the error parsing