You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Don't retry non-retryable errors (401, 4xx) in retryWithBackoffΒ #1081
retryWithBackoff in src/utils/retry.ts retries all errors blindly, including permanent failures like 401 Unauthorized. This wastes ~35 seconds (5s + 10s + 20s backoff) on errors that will never succeed on retry.
Common example: "Workflow validation failed" 401 when a workflow file differs from the default branch β this is deterministic and will fail identically on every attempt.
exchangeForAppToken already handles the specific workflow_not_found_on_default_branch error code by throwing WorkflowValidationSkipError, but retryWithBackoff catches it and retries anyway since it has no concept of non-retryable errors.
More broadly, any 4xx HTTP error (400, 401, 403, 404, 422) is a client error and non-retryable β only 5xx and network errors are worth retrying.
Suggested fix
Option A β minimal: re-throw WorkflowValidationSkipError immediately in the catch block of retryWithBackoff.
Option B β generic: add a shouldRetry predicate to RetryOptions:
Activity
fix: skip retries for non-retryable errors in retryWithBackoff
fix: skip retries for non-retryable errors via NonRetryable marker inβ¦
fix: skip retries for non-retryable errors in retryWithBackoff (#1082)