Skip to main content
All library-defined exceptions are importable from modal_devin.

ModalDevinError

Base class for errors raised specifically by modal-devin. Catch it only when one fallback is appropriate for every library failure.

ConfigurationError

The application contains an invalid worker name, URL, setting, environment value, credential, or managed Sandbox override. Correct the reported configuration and redeploy.

ModalCompatibilityError

This release requires a Modal SDK capability missing from the installed version. Run modal-devin doctor, then install a supported Modal version.

OutpostsAPIError

A Devin API request failed because of authentication, HTTP, connection, or timeout behavior. Check the credential, outpost, configured API URL, and preceding network error.

OutpostsProtocolError

Devin returned a response outside this release’s safe handling range. Check release compatibility and the original response error; mark the affected invocation as failed.

SessionStatusUnknownError

The worker exited, but modal-devin was unable to confirm a safe final session state. It attempts to preserve the filesystem before raising. Resolve the preceding API or compatibility problem, then retry or resume the session.

WorkerExitedError

The Devin worker returned a nonzero status after recovery handling. Inspect the preceding worker output.
str
Session whose worker failed.
int
Nonzero worker process exit status.
Let lifecycle exceptions propagate from the generated function so Modal records failed attempts and applies its configured retry policy.