Upload dialog hides a failed calendar request #50

Open
opened 2026-10-03 19:44:40 +00:00 by jalenluorion · 0 comments
Member

What's wrong
If the request for your uploadable calendars fails, the error is never caught: the console shows an unhandled promise rejection and the dialog shows an empty dropdown with no explanation.

How to reproduce

  1. Sign in, open DevTools > Network, right-click get_admin_categories and choose "Block request URL".
  2. Click the Upload button in the navbar.
  3. The console shows "Uncaught (in promise)" and the dropdown is empty with no error.

Expected
The dialog says the calendars could not be loaded and offers a retry.

Where to look

  • web/src/app/components/ModalUploadOne.tsx: fetchAdminCategories has try/finally but no catch. Add a catch, keep an error state, and show it with a Retry button.
  • In the same file, the "Loading Calendars..." view is drawn without the shared Modal, so it has no backdrop or close button; wrap it in Modal too.

Done when

  • A failed request shows a message and Retry works.
  • No unhandled rejection in the console.
  • The loading view can be closed.
**What's wrong** If the request for your uploadable calendars fails, the error is never caught: the console shows an unhandled promise rejection and the dialog shows an empty dropdown with no explanation. **How to reproduce** 1. Sign in, open DevTools > Network, right-click `get_admin_categories` and choose "Block request URL". 2. Click the Upload button in the navbar. 3. The console shows "Uncaught (in promise)" and the dropdown is empty with no error. **Expected** The dialog says the calendars could not be loaded and offers a retry. **Where to look** - `web/src/app/components/ModalUploadOne.tsx`: `fetchAdminCategories` has `try`/`finally` but no `catch`. Add a `catch`, keep an error state, and show it with a Retry button. - In the same file, the "Loading Calendars..." view is drawn without the shared `Modal`, so it has no backdrop or close button; wrap it in `Modal` too. **Done when** - [ ] A failed request shows a message and Retry works. - [ ] No unhandled rejection in the console. - [ ] The loading view can be closed.
jalenluorion added this to the Phase 1 milestone 2026-10-03 19:44:40 +00:00
jalenluorion added this to the CMUCal project 2026-10-03 19:45:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/cal#50
No description provided.