-
Notifications
You must be signed in to change notification settings - Fork 14
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 toast will be shown while bug reporting #548
Conversation
For the issue - #506
assets/js/event-handler.js
Outdated
Toast.fire({ | ||
icon: 'error', | ||
iconColor: "white", | ||
color: "white", | ||
background: "#f27474", | ||
timer: 5000, | ||
title: 'Bug Report Failed, Please Try Again', | ||
}) | ||
text: error ? error.message : 'An error occurred while reporting the bug' |
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.
Showing the user this error message is not useful. You can log it to the console.
In most cases this message is going to be too technical for a general user to understand.
assets/js/event-handler.js
Outdated
@@ -30,17 +31,19 @@ document.getElementById('bug-report').addEventListener('vl-bug-report', (e) => { | |||
background: "#a5dc86", | |||
title: 'Bug Reported Successfully', | |||
}) | |||
} else { | |||
} else { | |||
const error = event.detail.error; | |||
Toast.fire({ | |||
icon: 'error', | |||
iconColor: "white", | |||
color: "white", | |||
background: "#f27474", | |||
timer: 5000, | |||
title: 'Bug Report Failed, Please Try Again', |
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's be good to shorten the title and move some of the details into the text section
error message handled well: 1. Logged the technical detailed error 2. Removed unnecessary exposure of the error to the user.
For the issue - #506