Expand description
The error-page node — replaces the body and content type of
gateway-generated error responses (404, 500, 502, 503) with configured
pages. Port of APISIX’s error-page plugin (response-phase: place after
upstream, before client).
Deviations from APISIX:
- APISIX configures the pages via plugin metadata (with an
enableflag); featherbit has no metadata tier, so the pages live directly in the node config and placing the node in the graph is the enable switch. - APISIX only intercepts responses whose source is not the upstream
(
get_response_source(ctx) ~= "upstream"). featherbit’s equivalent heuristic isContext.errorsbeing non-empty — a response produced by the gateway (error-handler, auth rejection, …) always carries the error record that routed it there, while a clean upstream response does not. An upstream’s own 502 therefore passes through untouched, exactly as in APISIX.
Structs§
- Error
Page 🔒 - One configured error page.
- Error
Page Plugin - Replaces
Context.response.bodyandcontent-typewhen the response was generated by the gateway (heuristic:Context.errorsnon-empty) and its status code has a configured page. All other responses pass through unchanged. This plugin never fails at execution time.
Constants§
- SUPPORTED_
STATUS 🔒 - The status codes APISIX’s error-page supports (its metadata schema
hardcodes
error_404/error_500/error_502/error_503).
Functions§
- default_
body 🔒 - The default page body, mirroring APISIX’s
err_bodytemplate (with the gateway’s own name in the footer).