Error interceptor
Replace upstream error responses with a custom body or template.
| Type | errorInterceptor |
| Category | Observability |
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | true/false | yes | true | Enabled. |
contentType | text | no | application/json | Content-Type of the custom bodies, e.g. application/json. |
errors | list of groups | yes | — | Status codes to intercept. Set a body or file, or neither to pass through. |
errors
Status codes to intercept. Set a body or file, or neither to pass through.
A list; each entry has these fields.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
statusCode | number | yes | — | HTTP status to intercept, e.g. 404. |
body | text | no | — | Custom response body (JSON or text). |
file | text | no | — | Path to a template file served instead of a body. |