RequestException
class RequestException extends HttpClientException
Constants
| DEFAULT_TRUNCATE_AT |
The default truncation length for exception messages. |
Properties
| false|int|null | $truncateExceptionsAt | The current truncation length for the exception message. |
|
| static false|int | $truncateAt | The global truncation length for the exception message. |
|
| bool | $hasBeenSummarized | Whether the response has been summarized in the message. |
Methods
Create a new exception instance.
Enable truncation of request exception messages.
Set the truncation length for request exception messages.
Disable truncation of request exception messages.
Prepare the exception message and set the summarized flag.
Flush all static state.
Details
at line 34
__construct(Response $response, false|int|null $truncateExceptionsAt = null)
Create a new exception instance.
at line 49
static void
truncate()
Enable truncation of request exception messages.
Boot-only. The flag persists in a static property for the worker lifetime and applies to every HTTP client exception across all coroutines.
at line 60
static void
truncateAt(int $length)
Set the truncation length for request exception messages.
Boot-only. The length persists in a static property for the worker lifetime and applies to every HTTP client exception across all coroutines.
at line 71
static void
dontTruncate()
Disable truncation of request exception messages.
Boot-only. The flag persists in a static property for the worker lifetime and applies to every HTTP client exception across all coroutines.
at line 79
bool
report()
Prepare the exception message and set the summarized flag.
at line 93
protected string
prepareMessage(Response $response)
Prepare the exception message.
at line 115
static void
flushState()
Flush all static state.