Our solution
Configurable control over what errors reveal
Choose a mode, whitelist the extension fields clients need, and strip everything else. The defaults are tuned for production security with client error handling preserved.
From raw error to filtered response
Choose wrapped mode (default) or pass-through mode for error handling.
In wrapped mode, subgraph errors are encapsulated in a generic "Failed to fetch from Subgraph" message. Subgraph error details appear in extensions.errors.
Configure allowed_extension_fields to whitelist specific extension fields (e.g., "code") while blocking all others. The default allowlist is ["code"].
Set omit_extensions: true for maximum security — no extension fields reach clients.
In pass-through mode, errors are forwarded directly. Use allowed_extension_fields and omit_locations: true to control what is included.
Set attach_service_name: true to include the subgraph name in error responses, or leave it off to hide subgraph identity.
In dev_mode, the router exposes additional subgraph error details. Ensure dev_mode: false in production.

