Module: Ruact::ServerFunctions::ErrorRendering
- Included in:
- Ruact::Server
- Defined in:
- lib/ruact/server_functions/error_rendering.rb
Overview
Story 9.1 — the shared core for the Story 8.4 structured-error rendering and the Story 8.5 upload guard, included by Ruact::Server (the route-driven concern hosts include). Story 9.9 demolished the v1 endpoint that previously shared this code, so Ruact::Server is now the sole home.
Behavioral specialization is expressed through three private hooks, which the including controller may override:
- {#__ruact_error_action_name} — where the payload's `action_name`
comes from. Default: the controller's own `action_name`.
- {#__ruact_render_structured_error?} — whether the rescue handler
renders the structured JSON payload for this request, or re-raises so
Rails' default error handling proceeds. {Ruact::Server} gates this on
its function-call predicate.
- {#__ruact_upload_guard_applicable?} — whether the upload guard applies
to this request at all. {Ruact::Server} skips GET/HEAD so page actions
stay byte-for-byte untouched.
All methods are private on the including controller; nothing here is public API surface.