exceptions
Class MirascopeError
Base exception for all Mirascope errors.
Bases:
ExceptionAttributes
| Name | Type | Description |
|---|---|---|
| original_exception | Exception | None | - |
Class APIError
Base class for API-related errors.
Bases:
MirascopeErrorAttributes
| Name | Type | Description |
|---|---|---|
| status_code | int | None | - |
Class ConnectionError
Raised when unable to connect to the API (network issues, timeouts).
Bases:
MirascopeErrorClass AuthenticationError
Raised for authentication failures (401, invalid API keys).
Bases:
APIErrorClass PermissionError
Raised for permission/authorization failures (403).
Bases:
APIErrorClass BadRequestError
Raised for malformed requests (400, 422).
Bases:
APIErrorClass NotFoundError
Raised when requested resource is not found (404).
Bases:
APIErrorClass ToolNotFoundError
Raised if a tool_call cannot be converted to any corresponding tool.
Bases:
MirascopeErrorClass FeatureNotSupportedError
Raised if a Mirascope feature is unsupported by chosen provider.
If compatibility is model-specific, then model_id should be specified.
If the feature is not supported by the provider at all, then it may be None.
Bases:
MirascopeErrorAttributes
| Name | Type | Description |
|---|---|---|
| provider | Provider | - |
| model_id | ModelId | None | - |
| feature | str | - |
Class FormattingModeNotSupportedError
Raised when trying to use a formatting mode that is not supported by the chosen model.
Bases:
FeatureNotSupportedErrorAttributes
| Name | Type | Description |
|---|---|---|
| formatting_mode | FormattingMode | - |
Class RateLimitError
Raised when rate limits are exceeded (429).
Bases:
APIErrorClass ServerError
Raised for server-side errors (500+).
Bases:
APIErrorClass TimeoutError
Raised when requests timeout or deadline exceeded.
Bases:
MirascopeError