Skip to main content

Error interceptor

Replace upstream error responses with a custom body or template.

TypeerrorInterceptor
CategoryObservability

Fields​

FieldTypeRequiredDefaultDescription
enabledtrue/falseyestrueEnabled.
contentTypetextnoapplication/jsonContent-Type of the custom bodies, e.g. application/json.
errorslist of groupsyes—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.

FieldTypeRequiredDefaultDescription
statusCodenumberyes—HTTP status to intercept, e.g. 404.
bodytextno—Custom response body (JSON or text).
filetextno—Path to a template file served instead of a body.