From 08d3b04d14187752783f6ce5eed31a03919462f3 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Thu, 12 Feb 2026 18:41:34 -0800 Subject: [PATCH] Add retry logic with exponential backoff for Temporal workflow submission (#4734) --- skyvern/exceptions.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/skyvern/exceptions.py b/skyvern/exceptions.py index 38ef49e6..ec0789df 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}")