Skip to content

UI: Enhance Error Message Specificity in User Invite Modal #1053

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zihanKuang
Copy link

@zihanKuang zihanKuang commented May 25, 2025

Notes for Reviewers

This PR fixes #1050

Reason for Changes

The primary goal is to improve the user experience by providing more specific and actionable feedback when an invitation fails due to common, understandable reasons. This allows users to better diagnose the issue.

By whitelisting specific messages for detailed display, I avoid exposing end-users to potentially confusing or overly technical error messages.

image

Signed-off-by: Zihan Kuang <zihan_kuang@outlook.com>
Signed-off-by: Zihan Kuang <zihan_kuang@outlook.com>
if (
error &&
error.data &&
typeof error.data === 'object' &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create new error codes in the respective handlers.

@zihanKuang
Copy link
Author

zihanKuang commented May 27, 2025

Hi @FaheemOnHub,

I've just pushed the latest updates to my backend PR: https://github.com/layer5io/meshery-cloud/pull/3527. Could you please take a look and let me know if any further modifications are needed?

Separately, regarding my frontend PR, could you advise if this should now be closed, or if it still requires further updates or work from my side?😊

Thanks!

@FaheemOnHub
Copy link
Contributor

Hi @FaheemOnHub,

I've just pushed the latest updates to my backend PR: layer5io/meshery-cloud#3527. Could you please take a look and let me know if any further modifications are needed?

Separately, regarding my frontend PR, could you advise if this should now be closed, or if it still requires further updates or work from my side?😊

Thanks!

as currently we don't have notification center, we could just display the short description in err.

error &&
error.data &&
typeof error.data === 'object' &&
error.data.code === INVITE_EXISTING_USER_ERROR_CODE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it necessary to hardcode, we can directly display the error message 🤔

@zihanKuang
Copy link
Author

Hi @FaheemOnHub, thanks for the feedback!

You're right, but the backend can send various error messages. My thinking was to specifically check for error.data.code === INVITE_EXISTING_USER_ERROR_CODE so we can provide user-friendly guidance for that particular scenario. For other potential errors from this endpoint, I fall back to a more general message. So I use hardcode to identify.

@zihanKuang zihanKuang requested a review from FaheemOnHub June 9, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Improve Error Reporting for Failed User Invitations
3 participants