ecluse:ecluse-runtime
Safe HaskellNone
LanguageGHC2021

Ecluse.Runtime.Aws.Fault

Description

The amazonka edge of the transport-fault vocabulary: fold the AWS error sum into Ecluse.Core.Fault at an adapter boundary.

Three adapters face the same Error, so the classification lives once, here: the SQS mirror queue, the advisory sync's S3 transport, and the CodeArtifact store maintenance leaf. A service-level refusal (a throttle, an access denial, a serialisation surprise) is TransportProtocol with the rendered error as detail: the wire worked, the service said no.

Synopsis

Documentation

classifyAwsTransport :: Error -> TransportFault Source #

Classify an amazonka error into the core transport vocabulary.

sendClassified :: AWSRequest a => (Error -> e) -> Env -> a -> IO (Either e (AWSResponse a)) Source #

Send a request with the AWS error kept out of the exception channel and folded into the caller's own fault type, which is how every adapter here reports a failure as a value.