protected function checkResponseErrors(ResponseInterface $response)
	{
		$status = intval($response->getStatusCode());

		if ($status === 200) return;

		switch ($status) {
			case 401:
				throw new AuthorizationException($response);
			default:
				throw new RequestException($response);
		}
	}
protected function checkResponseErrors(ResponseInterface $response)
	{
		$status = intval($response->getStatusCode());

		if ($status === 200) return;

		switch ($status) {
			case 401:
				throw new AuthorizationException($response);
			default:
				throw new RequestException($response);
		}
	}
protected function checkResponseErrors ( ResponseInterface $ response ) { $ status = intval ( $ response -> getStatusCode ( ) ) ; if ( $ status === 200 ) return ; switch ( $ status ) { case 401 : throw new AuthorizationException ( $ response ) ; default : throw new RequestException ( $ response ) ; } }
Checks the given response for error codes, throwing the appropriate
exceptions if needed.
@param  ResponseInterface $response
Checks the given response for error codes throwing the appropriate exceptions if needed .