-
Notifications
You must be signed in to change notification settings - Fork 0
Error Handling #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Handling #78
Conversation
Co-authored-by: Jack Zgombic <[email protected]>
Co-authored-by: Jack Zgombic <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 33 out of 34 changed files in this pull request and generated 33 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (res.status === 404) { | ||
| addToast("error", MESSAGES.ERROR_GENERIC); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the endpoint returns 404, it would probably be a better user experience to show an error message that the link is expired, rather than a generic message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are all 404 messages from this endpoint only for expired links? Or is 404 also returned for links not found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
404 is returned for an invalid reset token, which can be either an expired token or a token that never existed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would just saying the the reset token is invalid be better then?
|
This pull request significantly improves the user experience and error handling across all authentication-related pages (
login,register,forgot-password,reset-password, and email confirmation) by replacing disruptive alert dialogs with inline error displays and toast notifications. It also standardizes the use of form components, enhances rate-limit feedback, and centralizes error formatting.User experience and error handling improvements:
alertcalls with inline error messages using theBannercomponent and toast notifications via theuseToasthook, providing a more user-friendly and non-disruptive way to communicate errors and status updates. [1] [2] [3] [4] [5]Form and input improvements:
TextInputFieldcomponent from@/components/text-input-field, ensuring consistent styling and behavior across pages. [1] [2] [3] [4]Rate limiting and error feedback:
Bannercomponent, with user-friendly messages and titles to inform users when they need to slow down. [1] [2] [3]Code organization and maintainability:
formatApiErrorfrom@/lib/utils/api/handle-api-erroracross all relevant files. [1] [2] [3] [4] [5]handleErrors, etc.) for clarity and DRYness. [1] [2] [3] [4]UI layout enhancements:
gap-4), improving the visual structure and readability of authentication forms. [1] [2] [3] [4]