src/Client.php
protected function checkErrorResponse(ResponseInterface $response)
    {
        $statusCode = $response->getStatusCode();
        if (200 <= $statusCode && $statusCode < 299) {
            if (!$response->getBody()->getSize()) {
                throw new BadResponseException('unexpected empty body');
            }

            return;
        }

        // Mitake API always return status code 200
        throw new BadResponseException(sprintf('unexpected status code: %d', $statusCode));
    }
protected function checkErrorResponse(ResponseInterface $response)
    {
        $statusCode = $response->getStatusCode();
        if (200 <= $statusCode && $statusCode < 299) {
            if (!$response->getBody()->getSize()) {
                throw new BadResponseException('unexpected empty body');
            }

            return;
        }

        // Mitake API always return status code 200
        throw new BadResponseException(sprintf('unexpected status code: %d', $statusCode));
    }
protected function checkErrorResponse ( ResponseInterface $ response ) { $ statusCode = $ response -> getStatusCode ( ) ; if ( 200 <= $ statusCode && $ statusCode < 299 ) { if ( ! $ response -> getBody ( ) -> getSize ( ) ) { throw new BadResponseException ( 'unexpected empty body' ) ; } return ; } // Mitake API always return status code 200 throw new BadResponseException ( sprintf ( 'unexpected status code: %d' , $ statusCode ) ) ; }
Check the API response for errors

@param ResponseInterface $response
@throws BadResponseException
Check the API response for errors