Error handling
The SDK exposes a small hierarchy of exceptions insimulacrum.exceptions. Handling them intentionally keeps your pipelines resilient.
Catching authentication failures
AuthError also covers the more specific ApiKeyInvalidError, ApiKeyInactiveError, and ApiKeyExpiredError. Use targeted handlers when you need bespoke remediation.
Handling invalid payloads
InvalidRequestError and includes context in the message.