class RequestException extends HttpClientException (View source)

Properties

Response $response

The response instance.

static int|false $truncateAt

The truncation length for the exception message.

Methods

void
__construct(Response $response)

Create a new exception instance.

static void
truncate()

Enable truncation of request exception messages.

static void
truncateAt(int $length)

Set the truncation length for request exception messages.

static void
dontTruncate()

Disable truncation of request exception messages.

string
prepareMessage(Response $response)

Prepare the exception message.

Details

void __construct(Response $response)

Create a new exception instance.

Parameters

Response $response

Return Value

void

static void truncate()

Enable truncation of request exception messages.

Return Value

void

static void truncateAt(int $length)

Set the truncation length for request exception messages.

Parameters

int $length

Return Value

void

static void dontTruncate()

Disable truncation of request exception messages.

Return Value

void

protected string prepareMessage(Response $response)

Prepare the exception message.

Parameters

Response $response

Return Value

string

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.