Table of Contents

Class Error.Forbidden

Namespace
Trellis
Assembly
Trellis.Core.dll

HTTP 403 — authorization policy refused the request.

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

Constructors

Forbidden(string, ResourceRef?)

HTTP 403 — authorization policy refused the request.

public Forbidden(string PolicyId, ResourceRef? Resource = null)

Parameters

PolicyId string

Identifier of the policy that denied access.

Resource ResourceRef?

Optional resource the policy was evaluated against.

Properties

Code

Gets the per-instance machine-readable code. Defaults to Kind; cases whose payload carries a per-instance ReasonCode override this.

public override string Code { get; }

Property Value

string

Kind

Gets the stable, IANA-aligned identifier for this case (e.g. "not-found", "unprocessable-content"). Suitable for telemetry, problem-details type URI synthesis, and wire serialization.

public override string Kind { get; }

Property Value

string

PolicyId

Identifier of the policy that denied access.

public string PolicyId { get; init; }

Property Value

string

Resource

Optional resource the policy was evaluated against.

public ResourceRef? Resource { get; init; }

Property Value

ResourceRef?