Skip to content

Conversation

@HuyPhanNguyen
Copy link
Contributor

Background

Network timeouts and transient HTTP errors (502, 504) caused "Unknown task Id" failures instead of retrying. Promise.allSettled() swallowed errors and returned empty arrays.

Change

  • Changed Promise.allSettled() to Promise.all() to propagate errors
  • Added retry logic with exponential backoff (5s → 10s → 20s)
  • Retries on HTTP 429/502/503/504 and network errors (ETIMEDOUT, ECONNRESET, etc.)
  • Added validation to handle null/undefined tasks in API responses
  • Configurable via ServerTaskWaiterOptions: maxRetries (default: 3), retryBackoffMs (default: 5000)

[sc-124345]

@HuyPhanNguyen HuyPhanNguyen requested a review from a team October 26, 2025 23:15
Copy link
Contributor

@hnrkndrssn hnrkndrssn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per my inline comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants