Files
Imago/sdk/imago_client/exceptions.py
T
bruno 2f2a5e9b4a
CI / Lint & Format (push) Failing after 28s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 8s
CI / Docker Build (push) Has been skipped
Add admin panel, WebSocket support, and API versioning
Introduce an admin portal (React + Nginx), WebSocket routing, and
API versioning middleware with `/api/v1/` prefix deprecation.
Add master API key authentication, new Prometheus metrics for AI
token consumption and active WebSockets, and extend S3 config
with a public endpoint URL. Update test paths and fixtures to
align with the new routing structure.
2026-06-22 11:25:22 -04:00

26 lines
787 B
Python

"""
Exceptions for the Imago Client SDK.
"""
class ImagoError(Exception):
"""Base exception for all Imago SDK errors."""
class AuthError(ImagoError):
"""Raised when authentication fails (401)."""
class QuotaError(ImagoError):
"""Raised when quota limits are reached (429 or 403 quota)."""
class NotFoundError(ImagoError):
"""Raised when a requested resource is not found (404)."""
class APIError(ImagoError):
"""Raised when the API returns an unexpected error."""
def __init__(self, message: str, status_code: int = None, details: dict = None):
super().__init__(message)
self.status_code = status_code
self.details = details or {}
class PipelineError(ImagoError):
"""Raised when an error occurs in the AI processing pipeline."""