Skip to content

Conversation

meirk-brd
Copy link
Collaborator

Problem

Web data tools were continuously polling and timing out when the API returned HTTP 400 errors (e.g., "Snapshot is empty"). This resulted in unnecessary API calls and long wait times before eventual timeout.

Solution

Added a check to immediately fail on HTTP 400 responses in the polling loop. Since 400 errors indicate client errors that won't resolve with retrying, we now throw the error immediately instead of continuing to poll.

Changes

  • Added if (e.response?.status === 400) throw e; in the polling catch block
  • Prevents endless polling when snapshots fail with client errors
  • Reduces API calls and provides faster feedback to users

Testing

Verified that failed snapshots (returning "Snapshot is empty" with HTTP 400) now fail immediately instead of timing out after 600 attempts.

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.

1 participant