Expand description
The exit-transformer node — reshapes gateway-generated responses
(“exits”: auth rejections, rate-limit denials, upstream failures, …)
with a status-code remap and a body template. Reinterpreted subset of
APISIX’s exit-transformer plugin (response-phase: place after
upstream, before client).
This is a deliberate reinterpretation, not a faithful port. APISIX’s
plugin registers user-supplied Lua functions that receive
(code, body, headers) and return replacements. Arbitrary scripted
transformation belongs to featherbit’s script node; this node keeps the
declarative core of the idea:
status_mapremaps exit status codes (e.g. hide a 502 as a 503), andbodyrenders a$vartemplate (including$status) as the new body,
applied only to responses the gateway itself generated (heuristic:
Context.errors non-empty), or unconditionally with always: true.
Structs§
- Exit
Transformer Plugin - Remaps
Context.response.status_codeviastatus_mapand/or replaces the body with an interpolated$vartemplate — but only when the response was generated by the gateway (Context.errorsnon-empty), unlessalwaysis set. This plugin never fails at execution time.
Functions§
- parse_
status 🔒 - Validates one status code (map key or value): an integer within 100-599.