Skip to content

SafeRenderer

Default renderer: never leaks exception internals.

No message, no class name, no trace, no X-Quiote-Error-Type header — just a generic body plus the correlation id, so an operator can find the real detail in the logs without a client ever seeing it. Used whenever core.developer_exceptions is off (the default).

final class SafeRenderer implements ExceptionRenderer

ImplementsExceptionRenderer
UsesNegotiatesContent
Since1.0.0
SourceException/Rendering/SafeRenderer.php
MethodDescription
render(Throwable $e, ServerRequestInterface $request, int $status, ?string $correlationId): ResponseInterfaceRenders a generic error response that reveals nothing about the exception.

public function render(Throwable $e, ServerRequestInterface $request, int $status, ?string $correlationId): ResponseInterface

Renders a generic error response that reveals nothing about the exception.

The media type is negotiated from the request: a JSON object, a plain-text body or a minimal HTML page. All three carry only “Internal Server Error” (5xx) or “Request Error” (anything else) plus the correlation id when one is known. The Throwable itself is never read.

ParameterTypeDescription
$eThrowable
$requestServerRequestInterface
$statusint
$correlationId?``string

Returns ResponseInterface