Severity: High
Labels: bug, frontend, P1
Location:frontend/src/components/Gradebook/AssignmentModal.tsx:193-197, EditWeightsModal.tsx:108-112, LetterScaleEditor.tsx:99-103 (all try/finally, no catch); parent callbacks frontend/src/components/screens/Gradebook/Course.tsx:104-146 (no try/catch, no toast).
Description
Each modal does setSaving(true); try { await onSave(...); onClose(); } finally { setSaving(false); }, and the parent onSave/onDelete callbacks also lack try/catch and don't toast (no useToast import in these files). On API failure the rejection skips onClose(), re-enables the button, and shows nothing — the click appears to do nothing.
Steps to reproduce
- Open New assignment / Edit weights / Letter scale.
- Trigger Save while the API fails (offline or 4xx/5xx).
- Modal stays open, button re-enables, no error message.
Expected vs actual
- Expected: an error toast (and keep-open or graceful handling).
- Actual: unhandled rejection, zero feedback.
Suggested fix
Add catch with toast.error(...) in each parent callback (or modal); only onClose() on success.
Acceptance criteria
- A failed gradebook save/delete shows an error toast and leaves the modal open with the data intact.
Severity: High
Labels: bug, frontend, P1
Location:
frontend/src/components/Gradebook/AssignmentModal.tsx:193-197,EditWeightsModal.tsx:108-112,LetterScaleEditor.tsx:99-103(alltry/finally, nocatch); parent callbacksfrontend/src/components/screens/Gradebook/Course.tsx:104-146(no try/catch, no toast).Description
Each modal does
setSaving(true); try { await onSave(...); onClose(); } finally { setSaving(false); }, and the parentonSave/onDeletecallbacks also lack try/catch and don't toast (nouseToastimport in these files). On API failure the rejection skipsonClose(), re-enables the button, and shows nothing — the click appears to do nothing.Steps to reproduce
Expected vs actual
Suggested fix
Add
catchwithtoast.error(...)in each parent callback (or modal); onlyonClose()on success.Acceptance criteria