class ApiErrorException extends RuntimeException (View source)

Methods

__construct(string $message = "", int $code = 0, Throwable|null $previous = null, array $details = [])

No description

array
getDetails()

Get additional error details

mixed
getDetail(string $key, mixed $default = null)

Get a specific detail by key

bool
hasDetail(string $key)

Check if a specific detail exists

Details

__construct(string $message = "", int $code = 0, Throwable|null $previous = null, array $details = [])

No description

Parameters

string $message

The error message

int $code

The error code

Throwable|null $previous

The previous throwable

array $details

Additional error details

array getDetails()

Get additional error details

Return Value

array

mixed getDetail(string $key, mixed $default = null)

Get a specific detail by key

Parameters

string $key
mixed $default

Return Value

mixed

bool hasDetail(string $key)

Check if a specific detail exists

Parameters

string $key

Return Value

bool