Table of Contents

Class Error.AuthenticationRequired

Namespace
Trellis
Assembly
Trellis.Core.dll

The operation requires authentication that was not supplied or could not be validated.

public sealed record Error.AuthenticationRequired : Error, IEquatable<Error>, IEquatable<Error.AuthenticationRequired>
Inheritance
Error.AuthenticationRequired
Implements
Inherited Members
Extension Methods

Remarks

Set Code to distinguish causes that share the 401 surface (e.g. "Authentication.InvalidCredentials", "Authentication.MissingCredentials", "Authentication.TokenExpired") so telemetry, dashboards, and client branching can tell them apart without parsing Detail.

Constructors

AuthenticationRequired(string?)

The operation requires authentication that was not supplied or could not be validated.

public AuthenticationRequired(string? Scheme = null)

Parameters

Scheme string

Optional authentication scheme name (e.g. "Bearer") when the producer knows which scheme is expected.

Remarks

Set Code to distinguish causes that share the 401 surface (e.g. "Authentication.InvalidCredentials", "Authentication.MissingCredentials", "Authentication.TokenExpired") so telemetry, dashboards, and client branching can tell them apart without parsing Detail.

Properties

Kind

Gets the stable domain slug for this case (e.g. "not-found", "invalid-input"). Suitable for telemetry, observability dimensions, and as the durable identifier that boundary layers translate into transport-specific type identifiers.

public override string Kind { get; }

Property Value

string

Scheme

Optional authentication scheme name (e.g. "Bearer") when the producer knows which scheme is expected.

public string? Scheme { get; init; }

Property Value

string