Exception hierarchy
Import exceptions fromsimulacrum.exceptions as needed. All SDK-specific errors subclass SimulacrumError.
| Exception | Description |
|---|---|
SimulacrumError | Base class; catch when you want to handle all SDK errors. |
AuthError | Authentication failed (covers invalid, inactive, or expired keys). |
ApiKeyInvalidError | API key is unknown to the platform. |
ApiKeyInactiveError | API key has been disabled administratively. |
ApiKeyExpiredError | API key has passed its expiration timestamp. |
QuotaExceededError | Request rejected because you exceeded usage limits. |
ForecastAlreadyRunningError | The same forecast job is currently in progress. |
InvalidRequestError | Payload failed server-side validation. |
ApiError | Generic API or parsing failure. |
Usage patterns
ERROR_CODE_MAP constant inside the module surfaces the mapping between API error_code values and exception classes. Extend your handlers as new codes are introduced.