| Methods |
public
|
__construct(?string $code = null, ?string $message = null, ?Throwable $originalException = null)
|
#
|
public
|
report(): bool
Control whether Laravel's exception handler logs this exception.
Control whether Laravel's exception handler logs this exception.
A 4xx OData error is an expected client outcome (a malformed query, an
unauthorized read, an unknown set) — not a server fault — so it must not spam the
error log with a stack trace. A 5xx is a genuine engine failure and is reported.
The return value follows Laravel's report() contract (Foundation Handler):
a non-false return means "handled — skip default logging"; a false return
lets the handler perform its normal error logging. Hence: 4xx → true (suppressed),
5xx → false (logged). The HTTP response is unchanged either way — this governs
server-side logging only.
|
#
|
public
|
code(string $code): $this
Set the OData error code
|
#
|
public
|
message(string $message): $this
Set the OData error message
Set the OData error message
Parameters
|
#
|
public
|
target(string $target): $this
Set the OData error target
Set the OData error target
Parameters
|
#
|
public
|
addDetail(string $code, string $message, ?string $target = null): $this
Set the OData error details
Set the OData error details
Parameters
|
#
|
public
|
addInnerError(string $key, string $value): $this
Set the OData inner error
Set the OData inner error
Parameters
|
#
|
public
|
header(string $key, string $value): $this
Set a header on the outgoing response
Set a header on the outgoing response
Parameters
|
#
|
public
|
serialize(): array
Serialize this error
|
#
|
public
|
toError(): array
Convert this exception to a Symfony error
Convert this exception to a Symfony error
|
#
|
public
|
getOriginalException(): Throwable|null
Get the original exception that caused this exception
Get the original exception that caused this exception
|
#
|
public
|
toResponse(null $request = null): ODataResponse
Convert this exception to a Symfony response
Convert this exception to a Symfony response
Parameters
Returns
|
#
|
public
|
getInnerException(): ?Throwable
|
#
|