Skip to content

Commit

Permalink
Merge pull request #1031 from golemfactory/bugfix/JST-1023/async-retr…
Browse files Browse the repository at this point in the history
…y-fix

fix: fixed retrying errors during fetching activity results
  • Loading branch information
grisha87 authored Jul 18, 2024
2 parents b14e8d6 + 7c4ba84 commit cb35fdb
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 cb35fdb

Please sign in to comment.