ProviderFailureContext
NexusLabs.Needlr.AgentFramework¶
NexusLabs.Needlr.AgentFramework.Providers¶
ProviderFailureContext Class¶
Diagnostic context passed to OnHit when a matching failure policy is applied to a provider's thrown exception.
public sealed record ProviderFailureContext : System.IEquatable<NexusLabs.Needlr.AgentFramework.Providers.ProviderFailureContext>
Inheritance System.Object 🡒 ProviderFailureContext
Implements System.IEquatable<ProviderFailureContext>
Constructors¶
ProviderFailureContext(string, Exception, Nullable<DateTimeOffset>) Constructor¶
Diagnostic context passed to OnHit when a matching failure policy is applied to a provider's thrown exception.
public ProviderFailureContext(string ProviderName, System.Exception Exception, System.Nullable<System.DateTimeOffset> SkipUntil);
Parameters¶
ProviderName System.String
Name of the failing provider (from Name).
Exception System.Exception
The exception that was thrown by ExecuteAsync(TQuery, CancellationToken) and matched by the policy.
SkipUntil System.Nullable<System.DateTimeOffset>
The absolute UTC timestamp until which the provider will be skipped on subsequent calls, or null when the matched policy specified SkipDuration as null (i.e. no cross-call skip applied). When the policy specified IndefiniteSkip, this resolves to System.DateTimeOffset.MaxValue.
Properties¶
ProviderFailureContext.Exception Property¶
The exception that was thrown by ExecuteAsync(TQuery, CancellationToken) and matched by the policy.
Property Value¶
ProviderFailureContext.ProviderName Property¶
Name of the failing provider (from Name).
Property Value¶
ProviderFailureContext.SkipUntil Property¶
The absolute UTC timestamp until which the provider will be skipped on subsequent calls, or null when the matched policy specified SkipDuration as null (i.e. no cross-call skip applied). When the policy specified IndefiniteSkip, this resolves to System.DateTimeOffset.MaxValue.