refactor: unify API error types - #562
Conversation
|
@jc1788-byte is attempting to deploy a commit to the David Dada's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@jc1788-byte Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
sshdopey
left a comment
There was a problem hiding this comment.
Great work on unifying the API error types! The shared ApiError class and normalizeApiError helper look solid, and the tests cover the key cases. Also nice catch fixing those malformed WebAuthn endpoint strings. This directly addresses issue #415. Keep it up! ❤️
|
Approved! 🎉 I couldn't auto-merge this just yet (it may need a rebase or have a check still running). A maintainer can merge it whenever it's ready. |
sshdopey
left a comment
There was a problem hiding this comment.
This is a solid step toward unifying API error types across the codebase. The new ApiError class, normalization helpers, and tests directly address the issue's goal of a shared error contract. The extra WebAuthn fix is a nice bonus. Great work! Keep it up! ❤️
|
Approved! 🎉 I couldn't auto-merge this just yet (it may need a rebase or have a check still running). A maintainer can merge it whenever it's ready. |
Summary
ApiErrorcontract undersrc/lib/error.tsCloses #415
Verification
npx vitest run src/lib/error.test.ts