Skip to content
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 toasts display raw JavaScript objects instead of user-friendly messages #34

Open
latifniz opened this issue Dec 21, 2024 · 0 comments

Comments

@latifniz
Copy link

Problem
When an error occurs, the toast notifications display raw JavaScript objects (e.g., Error: {message: 'Invalid request', code: 400}) instead of concise and user-friendly error messages. This makes it difficult for users to understand the issue and take corrective action.

Expected Behavior
Toast notifications should display clean, user-readable error messages such as:

"Invalid request. Please check your input."
"Failed to load data. Try again later."
Steps to Reproduce
Perform an action that triggers an error (Login
pehchan_login_error
).
Observe the error toast notification displayed on the screen.
Note that the toast contains the raw JavaScript object instead of a proper message.
Proposed Solution
Parse the error response and display only the relevant message (e.g., error.message or a predefined friendly message).
Use fallback messages for unknown or unhandled errors (e.g., "An unexpected error occurred. Please try again.").

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

No branches or pull requests

1 participant