Overview

Namespaces

  • Docta
    • MercadoLibre
      • OAuth2
        • Client
  • GuzzleHttp
    • Cookie
    • Exception
    • Handler
    • Promise
    • Psr7
  • League
    • OAuth2
      • Client
        • Grant
          • Exception
        • Provider
          • Exception
        • Token
        • Tool
  • Psr
    • Http
      • Message

Interfaces

  • GuzzleException

Exceptions

  • BadResponseException
  • ClientException
  • ConnectException
  • RequestException
  • SeekException
  • ServerException
  • TooManyRedirectsException
  • TransferException
  • Overview
  • Namespace
  • Class
  • Download

Class RequestException

HTTP Request exception

Exception
Extended by RuntimeException
Extended by GuzzleHttp\Exception\TransferException implements GuzzleHttp\Exception\GuzzleException
Extended by GuzzleHttp\Exception\RequestException

Direct known subclasses

GuzzleHttp\Exception\BadResponseException, GuzzleHttp\Exception\ConnectException, GuzzleHttp\Exception\TooManyRedirectsException

Indirect known subclasses

GuzzleHttp\Exception\ClientException, GuzzleHttp\Exception\ServerException
Namespace: GuzzleHttp\Exception
Located at src/Exception/RequestException.php
Methods summary
public
# __construct( $message, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response = null, Exception $previous = null, array $handlerContext = [] )

Overrides

Exception::__construct()
public static GuzzleHttp\Exception\RequestException
# wrapException( Psr\Http\Message\RequestInterface $request, Exception $e )

Wrap non-RequestExceptions with a RequestException

Wrap non-RequestExceptions with a RequestException

Parameters

$request
$e

Returns

GuzzleHttp\Exception\RequestException
public static GuzzleHttp\Exception\RequestException
# create( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response = null, Exception $previous = null, array $ctx = [] )

Factory method to create a new exception with a normalized error message

Factory method to create a new exception with a normalized error message

Parameters

$request
Request
$response
Response received
$previous
Previous exception
$ctx
Optional handler context.

Returns

GuzzleHttp\Exception\RequestException
public static string|null
# getResponseBodySummary( Psr\Http\Message\ResponseInterface $response )

Get a short summary of the response

Get a short summary of the response

Will return null if the response is not printable.

Parameters

$response

Returns

string|null
public Psr\Http\Message\RequestInterface
# getRequest( )

Get the request that caused the exception

Get the request that caused the exception

Returns

Psr\Http\Message\RequestInterface
public Psr\Http\Message\ResponseInterface|null
# getResponse( )

Get the associated response

Get the associated response

Returns

Psr\Http\Message\ResponseInterface|null
public boolean
# hasResponse( )

Check if a response was received

Check if a response was received

Returns

boolean
public array
# getHandlerContext( )

Get contextual information about the error from the underlying handler.

Get contextual information about the error from the underlying handler.

The contents of this array will vary depending on which handler you are using. It may also be just an empty array. Relying on this data will couple you to a specific handler, but can give more debug information when needed.

Returns

array
Methods inherited from Exception
__toString(), __wakeup(), getCode(), getFile(), getLine(), getMessage(), getPrevious(), getTrace(), getTraceAsString()
Magic methods inherited from GuzzleHttp\Exception\GuzzleException
getCode(), getFile(), getLine(), getMessage(), getPrevious(), getTrace(), getTraceAsString()
Properties inherited from Exception
$code, $file, $line, $message
MercadoLibre Provider for OAuth 2.0 Client API documentation generated by ApiGen