| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Server.Fault
Description
The request perimeter's fault vocabulary: what the serve boundary says about an exception that escaped a handler before the response was committed.
The serve pipeline reports every routine failure as a value (metadata errors,
fetch faults, rule decisions), so an exception reaching the perimeter is either
one of the few recognised typed channels -- a response-bound breach, the
response-assembly leg's
confined RenderEscape marker -- or an invariant break nothing classified.
classifyEscape folds whichever it is into a RequestFault: the bounded cause
feeds the ecluse.serve.perimeter.faults metric, the rendered detail feeds the
perimeter's log line, and neither ever reaches the client (the response is the route's
contract-admitted neutral 500).
Synopsis
- data RequestFault = RequestFault {}
- classifyEscape :: SomeException -> RequestFault
- newtype RenderEscape = RenderEscape SomeException
Documentation
data RequestFault Source #
One classified perimeter fault: the bounded cause a metric records and an operator triages by, and the rendered escape for the log line. Diagnostic text only -- it is never parsed, and no decision may branch on it.
Constructors
| RequestFault | |
Fields
| |
Instances
| Show RequestFault Source # | |
Defined in Ecluse.Core.Server.Fault Methods showsPrec :: Int -> RequestFault -> ShowS # show :: RequestFault -> String # showList :: [RequestFault] -> ShowS # | |
| Eq RequestFault Source # | |
Defined in Ecluse.Core.Server.Fault | |
classifyEscape :: SomeException -> RequestFault Source #
Fold an escaped exception into the perimeter's vocabulary: the recognised
typed channels classify by type, everything else is UnclassifiedFault with its
rendering carried for the log line.
newtype RenderEscape Source #
The response-assembly leg's escape marker: the assembled-representation
render is total by contract (a pure assembly over already-validated inputs), so
an exception escaping it is an invariant break -- wrapped in this confined
typed marker at the one place the render runs, so the perimeter can name the
leg it escaped from. It never crosses the perimeter (which classifies it as
RenderFault and answers the neutral 500).
Constructors
| RenderEscape SomeException |
Instances
| Exception RenderEscape Source # | |
Defined in Ecluse.Core.Server.Fault Methods toException :: RenderEscape -> SomeException # fromException :: SomeException -> Maybe RenderEscape # displayException :: RenderEscape -> String # backtraceDesired :: RenderEscape -> Bool # | |
| Show RenderEscape Source # | |
Defined in Ecluse.Core.Server.Fault Methods showsPrec :: Int -> RenderEscape -> ShowS # show :: RenderEscape -> String # showList :: [RenderEscape] -> ShowS # | |