Phase 3: handle Civil ID removal failures in candidate UI#32
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
BAWES
left a comment
There was a problem hiding this comment.
✅ Approved — Civil ID removal error handling
Review: Clean addition of error handling for Civil ID photo removal failures.
Strengths:
- Error state handling with toast notifications for both front/back photo removal
- Preview failure detection with guard (
frontIdPreviewFailed/backIdPreviewFailed) prevents toast spam - Proper error message extraction from API response
- Resets preview failure state on successful upload/re-upload
- TDD-consistent: adds state handling, then error display, then integration
Nitpick (non-blocking): The removeCivilPhotoErrorDescription function takes error: any — consider typing with AxiosError or a union type if the error shape is known.
CodeRabbit skipped ✅ | No CI checks defined for this repo
/claim #55
Related to BAWES-Universe/studenthub#55.
This PR handles the candidate-side Phase 3 Civil ID UI failure path:
onErrorfromProfile=1back-to-profile affordance so candidates are not trapped on the Civil ID page after a partial failureVerification run locally:
npm run test.unit -- src/providers/AxiosService.test.ts --rungit diff --checknpm run buildnpm run lintNotes:
npm run buildreports existing Browserslist data age and missingtheme_colorPWA warnings, but exits 0.npm cireports existing dependency vulnerabilities; not changed in this PR.