Exception: Protege::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/protege/errors/error.rb

Overview

Base class for every Protege error. Rescue Protege::Error to catch anything the engine raises without knowing the specific subclass; the concrete errors are flat top-level constants (+Protege::TimeoutError+, Protege::ToolNotFoundError, …) defined in lib/protege/errors/ (a collapsed autoload dir, so they read as Protege:: rather than Protege::Errors::).

Errors are ownerless, pipeline-wide types, so they live at the top level (next to Result and Event) rather than inside the Loop/Orchestrator/Gateway/Inference behavior namespaces.

Constant Summary collapse

TRANSIENT =

Provider failures a later attempt may clear — a job's retry_on list.

[
  InternalError,
  RateLimitedError,
  TimeoutError,
  UnavailableError
].freeze
PERMANENT =

Provider failures retrying cannot help — a job's discard_on list.

[
  BadRequestError,
  ContractViolationError,
  InvalidModelError,
  ResponseParseFailedError,
  UnauthorizedError,
  UnsupportedCapabilityError
].freeze