Skip to content

Automate browser based workflows with AI

Add retry logic with exponential backoff for Temporal workflow submission (#4734)

Shuchang Zheng08d3b04d1418
diff --git a/skyvern/exceptions.py b/skyvern/exceptions.py
index 38ef49e6d..ec0789df2 100644
--- a/skyvern/exceptions.py
+++ b/skyvern/exceptions.py
@@ -870,6 +870,15 @@ class OutputParameterNotFound(SkyvernHTTPException):
)
+class TemporalSubmissionFailed(SkyvernHTTPException):
+ def __init__(self, workflow_type: str, workflow_run_id: str | None = None) -> None:
+ workflow_run_str = f" for workflow_run_id={workflow_run_id}" if workflow_run_id else ""
+ super().__init__(
+ f"Failed to submit {workflow_type} to Temporal{workflow_run_str}",
+ status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
+ )
+
+
class AzureBaseError(SkyvernException):
def __init__(self, message: str) -> None:
super().__init__(f"Azure error: {message}")