Skip to content

Commit

Permalink
fix: fixed retrying errors during fetching activity results
Browse files Browse the repository at this point in the history
  • Loading branch information
mgordel committed Jul 15, 2024
1 parent 418a661 commit 7c4ba84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/activity/exe-script-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ export class ExeScriptExecutor {
}
} catch (error) {
logger.debug(`Failed to fetch activity results. Attempt: ${attempt}. ${error}`);
if (RETRYABLE_ERROR_STATUS_CODES.includes(error?.status)) {
const errorStatus = error?.status ?? error.previous?.status;
if (RETRYABLE_ERROR_STATUS_CODES.includes(errorStatus)) {
throw error;
} else {
bail(error);
Expand Down

0 comments on commit 7c4ba84

Please sign in to comment.