ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

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 pipeline reports every routine failure as a value, so an escape is either the response-assembly leg's confined RenderEscape marker or an invariant break nothing classified. classifyEscape folds whichever it is into a RequestFault, whose bounded cause feeds the ecluse.serve.perimeter.faults metric and whose rendered detail feeds the perimeter's log line. Neither reaches the client: the response is the route's contract-admitted neutral 500.

Synopsis

Documentation

data RequestFault Source #

One classified perimeter fault: the bounded cause a metric records and the rendered escape for the log line. The detail is diagnostic only, never parsed, and no decision may branch on it.

Constructors

RequestFault 

Fields

Instances

Instances details
Show RequestFault Source # 
Instance details

Defined in Ecluse.Core.Server.Fault

Eq RequestFault Source # 
Instance details

Defined in Ecluse.Core.Server.Fault

classifyEscape :: SomeException -> RequestFault Source #

Fold an escaped exception into the perimeter's vocabulary, UnclassifiedFault by default.

newtype RenderEscape Source #

The confined marker wrapping an exception that escaped the response-assembly render, which is total by contract. It never crosses the perimeter, which folds it to RenderFault.