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. Nothing here reaches the client, which gets the route's contract-admitted neutral 500.

Synopsis

Documentation

data RequestFault Source #

One classified perimeter fault: the bounded cause the ecluse.serve.perimeter.faults metric records, and the rendered escape for the log line.

Constructors

RequestFault 

Fields

  • rqCause :: RequestFaultCause

    The closed classification (the metric label vocabulary).

  • rqDetail :: Text

    The rendered escape, bounded to the shared log-line budget. Diagnostic only: never parsed, and no decision branches on it.

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 for an exception that escaped the response-assembly render, which is total by contract. The perimeter folds it to RenderFault.