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).
Synopsis
Section titled “Synopsis”final class SafeRenderer implements ExceptionRenderer
| Implements | ExceptionRenderer |
| Uses | NegotiatesContent |
| Since | 1.0.0 |
| Source | Exception/Rendering/SafeRenderer.php |
Methods
Section titled “Methods”| Method | Description |
|---|---|
render(Throwable $e, ServerRequestInterface $request, int $status, ?string $correlationId): ResponseInterface | Renders a generic error response that reveals nothing about the exception. |
render()
Section titled “render()”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.
| Parameter | Type | Description |
|---|---|---|
$e | Throwable | |
$request | ServerRequestInterface | |
$status | int | |
$correlationId | ?``string |
Returns ResponseInterface