Table of Contents

Struct ObjectStorageFailure

Namespace
MailFathom.Infrastructure.ObjectStorage
Assembly
MailFathom.Infrastructure.dll

Names what ended one operation against the configured object-storage endpoint.

[JsonConverter(typeof(ObjectStorageFailureJsonConverter))]
public readonly record struct ObjectStorageFailure : IEquatable<ObjectStorageFailure>
Implements
Inherited Members

Remarks

The type is a closed enumeration rather than a C# enum because a classification here is inseparable from two things it publishes: the MailFathomErrorCode a boundary reports it under, and the word a metric carries it as. Both are matched from outside this process — one in an alert, the other in a dashboard query — so neither may follow a rename of a member, and keeping either in a lookup table beside the type would let the two drift apart.

The set is closed because the whole point of classifying is to decide: what may be repeated, what a caller is told, and what an operator has to change. Unrecognized is the honest end of it rather than an omission — an answer nothing here recognizes is terminal, on the same reasoning every family in MailFathom.Infrastructure.Resilience.TransientFailureClassifier treats an unrecognized failure as terminal.

Being a struct, default is reachable and names no classification; IsSpecified reports that, and ObjectStorageUnavailableException rejects it rather than raising a failure with no code.

Properties

All

Gets every classification an operation can end in.

AuthenticationFailed

Gets the classification of an endpoint that refused the credential the deployment presented.

CallerCancelled

Gets the classification of an operation the caller itself abandoned.

ErrorCode

Gets the code a boundary reports this classification under.

HostShuttingDown

Gets the classification of an operation the host's own shutdown ended.

IsSpecified

Gets whether this value names a classification rather than the unusable struct default.

IsWorthRepeating

Gets whether an operation that ended this way may be attempted again.

Name

Gets the published name a metric, a log record, and a serialized form carry this classification as.

TimedOut

Gets the classification of an endpoint that did not answer within the budget the operation was given.

TransientTransportFailure

Gets the classification of an endpoint that could not be reached, or that answered inviting the request again.

Unrecognized

Gets the classification of a failure this system does not recognize.

Methods

ToString()

Returns the fully qualified type name of this instance.

TryParse(string?, out ObjectStorageFailure)

Parses a published classification name, ignoring case and surrounding whitespace.