CircuitOpenError

org.llm4s.error.CircuitOpenError
See theCircuitOpenError companion object
@Stable
final case class CircuitOpenError extends LLMError, RecoverableError

A call a circuit breaker refused without making it: the circuit is open, or it is half-open and another call is already probing the service.

It is the breaker's own answer, not the provider's: no request was sent, and nothing was learned about the service. It is a RecoverableError, since the same call can succeed once the circuit closes, with retryAfter as its retryDelay. It is not retried automatically: org.llm4s.reliability.RetryPolicy.isRetryable is false for it, because sending the call again at once is what an open circuit exists to prevent. A caller that wants to wait reads retryAfter; one with another provider falls back to it.

Value parameters

message

what happened, naming the provider and the time left

probing

true when the circuit is half-open and the call was refused because a probe is in flight

provider

the name the breaker was given for the service it guards

retryAfter

how long until the circuit lets a call through to probe the service; zero when a probe is already in flight, since its result may close the circuit at any moment

Attributes

Companion
object
Source
CircuitOpenError.scala
Graph
Supertypes
trait LLMError
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Suggested delay before retrying.

Suggested delay before retrying.

Attributes

Definition Classes
Source
CircuitOpenError.scala

Inherited methods

Optional error code for programmatic handling

Optional error code for programmatic handling

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Error correlation IDs for debugging

Error correlation IDs for debugging

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Formatted error message with context

Formatted error message with context

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Maximum number of retry attempts recommended.

Maximum number of retry attempts recommended.

Attributes

Inherited from:
RecoverableError
Source
RecoverableError.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields

override val context: Map[String, String]

Additional context information

Additional context information

Attributes

Source
CircuitOpenError.scala