Skip to content

AgentPrismProviderUnavailableException

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Thrown when the circuit breaker has temporarily taken a model provider out of service.

public sealed class AgentPrismProviderUnavailableException : AgentPrismException, ISerializable

objectExceptionAgentPrismExceptionAgentPrismProviderUnavailableException

ISerializable

AgentPrismException.ErrorType, Exception.GetBaseException(), Exception.ToString(), Exception.GetType(), Exception.TargetSite, Exception.Message, Exception.Data, Exception.InnerException, Exception.HelpLink, Exception.Source, Exception.HResult, Exception.StackTrace, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Thrown while the circuit is Open; no request reaches the provider. The circuit opens once consecutive failures pass FailureThreshold, and moves to half-open for a single trial after BreakDuration.

Creates a new error.

public AgentPrismProviderUnavailableException()

AgentPrismProviderUnavailableException(string)

Section titled “ AgentPrismProviderUnavailableException(string)”

Creates a new error.

public AgentPrismProviderUnavailableException(string message)

message string

The error message.

AgentPrismProviderUnavailableException(string, Exception)

Section titled “ AgentPrismProviderUnavailableException(string, Exception)”

Creates a new error.

public AgentPrismProviderUnavailableException(string message, Exception innerException)

message string

The error message.

innerException Exception

The underlying error.

The stable value written to AgentPrismException.ErrorType.

public const string ProviderUnavailableErrorType = "provider_unavailable"

string

Gets the stable error type name written to the run record.

public override string ErrorType { get; }

string

Defaults to the full name of the exception type, so today’s behaviour does not change. A derived type overrides this member when the record has to be machine readable — for example AgentPrismContentFilteredException writes content_filtered. Reports and alert rules can rely on this stable name instead of an assembly name.

The value is written to RunError.Type and carries no secret.

Gets the name of the provider whose circuit is open.

public string? ProviderName { get; init; }

string?

Gets the time at which the circuit goes half-open and is retried.

public DateTimeOffset? RetryAfter { get; init; }

DateTimeOffset?