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 groupsyesStatus 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
statusCodenumberyesHTTP status to intercept, e.g. 404.
bodytextnoCustom response body (JSON or text).
filetextnoPath to a template file served instead of a body.