HttpException

class DreamCommerce\ShopAppstoreLib\Exception\HttpException

An exception raised upon problem in communication layer (HTTP protocol error).

constants

LIMIT_TOO_LOW
specified request limit is too low
METHOD_NOT_SUPPORTED
tried to perform an unsupported HTTP method
QUOTA_EXCEEDED
requests quota exceeded
REQUEST_FAILED
a request failed (eg. I/O)
MALFORMED_RESULT
cannot parse server response

methods

__construct([$message = ''[, $code = 0[, $previous = null[, $method = null[, $url = null[, $headers = array()[, $query = array()[, $body = null[, $response = ''[, $responseHeaders = array()]]]]]]]]])

Method instantiates exception.

Parameters:
  • $message (string) – exception message
  • $code (integer) – error code
  • $previous (Exception|null) – a handle to the previous exception
  • $method (string) – HTTP method name
  • $url (string) – URL to entrypoint that caused failure
  • $headers (array) – an array with response headers
  • $query (array) – query string parameters
  • $body (array) – body parameters
  • $response (mixed) – server response
  • $responseHeaders (array) – server response headers
DreamCommerce\ShopAppstoreLib\Exception\HttpException::getHeaders()

Returns an array with headers returned upon exception raising.

Return type:array
Returns:headers
DreamCommerce\ShopAppstoreLib\Exception\HttpException::getResponse()

Returns a raw server response that caused an exception.

Return type:string
Returns:response
DreamCommerce\ShopAppstoreLib\Exception\HttpException::getMethod()

Returns HTTP method name.

Return type:string
Returns:method name
DreamCommerce\ShopAppstoreLib\Exception\HttpException::getUrl()

Returns URL.

Return type:string
Returns:URL
DreamCommerce\ShopAppstoreLib\Exception\HttpException::getBody()

Returns body used for request.

Return type:mixed
Returns:body
DreamCommerce\ShopAppstoreLib\Exception\HttpException::getQuery()

Returns query string parameters.

Return type:array
Returns:query string
DreamCommerce\ShopAppstoreLib\Exception\HttpException::getResponseHeaders()

Get returned server response headers.

Return type:array
Returns:response headers
DreamCommerce\ShopAppstoreLib\Exception\HttpException::__toString()

Serializes exception to loggable form.

Return type:array
Returns:string-serialized exception data