Skip to content

Senator List Fails to Load if Any Parallel API Call Errors#172

Merged
calebyhan merged 1 commit into
mainfrom
159/senator-list-fix
Jun 19, 2026
Merged

Senator List Fails to Load if Any Parallel API Call Errors#172
calebyhan merged 1 commit into
mainfrom
159/senator-list-fix

Conversation

@calebyhan

Copy link
Copy Markdown
Contributor

The contact form (/senators/contact) fetches senators, districts, and leadership data in a single Promise.all. If any one of those three calls fails (for example, if no leadership has been configured yet), the entire batch is aborted and the senator dropdown is never populated — leaving "Speaker of the Senate" as the only selectable recipient, with no error surfaced to the user.

Changes:

  • Promise.all replaced by Promise.allSettled

Closes #159

@github-actions

Copy link
Copy Markdown

Test Results

570 tests  ±0   570 ✅ ±0   48s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 4d628bb. ± Comparison against base commit fa9eb4a.

@MasonMines2006 MasonMines2006 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@calebyhan calebyhan merged commit 91e72e1 into main Jun 19, 2026
3 checks passed
@calebyhan calebyhan deleted the 159/senator-list-fix branch June 19, 2026 15:37
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.

Senator List Fails to Load if Any Parallel API Call Errors

2 participants