-
Notifications
You must be signed in to change notification settings - Fork 145
feat: improve error reporting for failed user invitations (#1050) #1092
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
base: master
Are you sure you want to change the base?
feat: improve error reporting for failed user invitations (#1050) #1092
Conversation
Hi @zihanKuang @leecalcote |
5c6baef
to
2a3b18c
Compare
@rishiraj38 Add it as an agenda item to the meeting minutes, if you would :) |
@rishiraj38 Add it as an agenda item to the meeting minutes, if you would :) |
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.
Thanks!
@FaheemOnHub, what do you think?
@vr-varad @FaheemOnHub Apologies for missing the recent meetings — I’ve been tied up with my college exams. I truly appreciate your understanding. Also, a heartfelt thank you to @hortison for approving my very first contribution to Layers. Grateful to be part of this journey! |
if (errorMessage.includes('email already exists')) { | ||
handleError('Invitation failed: Email address already exists.'); | ||
} else if (errorMessage.includes('invalid email')) { | ||
handleError('Invitation failed: Invalid email format.'); |
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.
should we just display the error message instead of hardcoding it ?
It recommended not to hardcode errors , we majorly do this on backend |
2a3b18c
to
1e28f7d
Compare
Signed-off-by: Rishi Raj <rishiraj438gt@gmail.com>
1e28f7d
to
6fff8b0
Compare
@FaheemOnHub @Namanv0509 @hortison Please review the latest commit. |
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.
it is an improvement , but technical error messages might not feel good to users.
Can u please provide some ss of error messages received after this change?
Description
This PR improves error reporting for failed user invitations by replacing the generic error message with specific, contextual messages based on the error returned from the backend.
Changes Made
Related Issue
Closes #1050