Skip to main content
Exceptions raised by metaflow.apps. All exception classes live in metaflow.apps.exceptions.

AppDeploymentException

Base exception for app deployment failures that occur after submission. All deployment exceptions provide a deployed_app property that returns a DeployedApp object, allowing you to inspect logs or app state even after a failure.
DeployedApp
The failed deployment. Use this to inspect logs, replica status, or other details after catching the exception, such as e.deployed_app.logs() to fetch recent logs.

AppCrashLoopException

Raised when an app worker crashes repeatedly during startup. The logs attribute contains recent log lines from the failing worker, which typically reveal the cause (such as import errors, missing dependencies, or application exceptions). The worker_id identifies which replica failed.
DeployedApp
The failed deployment. Use this to inspect logs, replica status, or other details after catching the exception, such as e.deployed_app.logs() to fetch recent logs.

AppReadinessException

Raised when the app fails to become ready to serve traffic. This can happen for two reasons:
  1. Timeout: The deployment did not satisfy its readiness_condition within max_wait_time seconds. Workers might still be starting up, pulling images, or stuck in a pending state.
  2. Traffic routing failure: Workers reached the readiness condition but the platform did not assign a URL or mark the app as ready to serve.
The reason attribute contains diagnostic details including the readiness condition that was requested, backend status flags, and a snapshot of worker counts (running / pending / crashlooping / failed). To investigate further, use deployed_app.logs() or deployed_app.replicas(). If the failure is a timeout, consider increasing max_wait_time. If workers crash shortly after startup, consider increasing readiness_wait_time to widen the post-readiness health-check window.
DeployedApp
The failed deployment. Use this to inspect logs, replica status, or other details after catching the exception, such as e.deployed_app.logs() to fetch recent logs.

AppConcurrentUpgradeException

Raised when another deployment started while this one was in progress. The current deployment has been invalidated because someone else deployed a new version. Check modified_by to see who triggered the conflicting deployment. Use unique app names or coordinate deployments to avoid this.
DeployedApp
The failed deployment. Use this to inspect logs, replica status, or other details after catching the exception, such as e.deployed_app.logs() to fetch recent logs.

AppUpgradeInProgressException

Raised when another deployment to this app is already running. This prevents conflicting concurrent deployments. Either wait for the existing deployment to complete, or use force_upgrade=True to take over.
DeployedApp
The failed deployment. Use this to inspect logs, replica status, or other details after catching the exception, such as e.deployed_app.logs() to fetch recent logs.

AppCreationFailedException

Raised when the platform rejects an app deployment request. Common causes include invalid configuration, quota limits, or permission issues. Check status_code and error_text for details on why the request was rejected.

AppNotFoundException

Raised when attempting to access an app that does not exist. This can occur when calling methods on DeployedApp for an app that has been deleted or never existed.

OuterboundsBackendUnhealthyException

Raised when the platform returns 5xx errors or is unreachable. Catch this to handle temporary platform outages gracefully. The request can typically be retried after a short delay.