private function handleHttpError()
    {
        $msg = 'HTTP API Error (HTTP response code was '.$this->state['response']['code'].')';
        switch ($this->state['response']['code']) {
            case 404:
                throw new InvalidRequestException($msg, $this->state);
            case 401:
                throw new ApiAuthenticationException($msg, $this->state);
            default:
                throw new ApiException($msg, $this->state);
        }
    }
private function handleHttpError()
    {
        $msg = 'HTTP API Error (HTTP response code was '.$this->state['response']['code'].')';
        switch ($this->state['response']['code']) {
            case 404:
                throw new InvalidRequestException($msg, $this->state);
            case 401:
                throw new ApiAuthenticationException($msg, $this->state);
            default:
                throw new ApiException($msg, $this->state);
        }
    }
private function handleHttpError ( ) { $ msg = 'HTTP API Error (HTTP response code was ' . $ this -> state [ 'response' ] [ 'code' ] . ')' ; switch ( $ this -> state [ 'response' ] [ 'code' ] ) { case 404 : throw new InvalidRequestException ( $ msg , $ this -> state ) ; case 401 : throw new ApiAuthenticationException ( $ msg , $ this -> state ) ; default : throw new ApiException ( $ msg , $ this -> state ) ; } }
Handle a HTTP error resulting from a request.

@param mixed $body The HTTP response body.
@param integer $code The HTTP error code.
@param string $resp The JSON encoded response body.

@throws MyAllocator\phpsdk\src\Exception\InvalidRequestException
@throws MyAllocator\phpsdk\src\Exception\APIAuthenticationException
@throws MyAllocator\phpsdk\src\Exception\ApiException
Handle a HTTP error resulting from a request .