Files
omnara-agent-monitor/omnara/sdk/exceptions.py
Kartik Sarangmath d12fe4a101 Initial commit
2025-07-08 19:17:44 -07:00

29 lines
600 B
Python

"""Exception classes for the Omnara SDK."""
class OmnaraError(Exception):
"""Base exception for all Omnara SDK errors."""
pass
class AuthenticationError(OmnaraError):
"""Raised when authentication fails."""
pass
class TimeoutError(OmnaraError):
"""Raised when an operation times out."""
pass
class APIError(OmnaraError):
"""Raised when the API returns an error response."""
def __init__(self, status_code: int, detail: str):
self.status_code = status_code
self.detail = detail
super().__init__(f"API Error {status_code}: {detail}")