Class ProviderException

All Implemented Interfaces:
Serializable

public class ProviderException extends Exception
Thrown by Layer 2 LLM providers (Anthropic, OpenAI, Gemini, DeepSeek) when an upstream call fails. Carries the provider name, the HTTP status (when applicable), and a retryable flag so the extraction loop can decide whether to back off or fail fast.

Checked.

Invariants:

  • errorCode non-null and non-blank.
  • message non-null.
  • providerName non-null and non-blank.
  • httpStatus is a non-null OptionalInt; pass OptionalInt.empty() (not null) for non-HTTP failures (timeout, DNS, schema-validation failure).
Since:
0.1.0
See Also:
  • Constructor Details

  • Method Details

    • errorCode

      public String errorCode()
    • providerName

      public String providerName()
    • httpStatus

      public OptionalInt httpStatus()
    • retryable

      public boolean retryable()