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 toast will be shown while bug reporting #548

Merged
merged 2 commits into from
Oct 6, 2024
Merged

Conversation

shraddha
Copy link
Collaborator

@shraddha shraddha commented Oct 5, 2024

For the issue - #506

@shraddha shraddha requested a review from raj-vlabs October 5, 2024 10:15
@shraddha shraddha self-assigned this Oct 5, 2024
@shraddha shraddha added the bug Something isn't working label Oct 5, 2024
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'
Copy link
Collaborator

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.

@@ -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',
Copy link
Collaborator

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.
@shraddha shraddha requested a review from raj-vlabs October 6, 2024 15:05
@raj-vlabs raj-vlabs merged commit c34a6c6 into master Oct 6, 2024
@raj-vlabs raj-vlabs deleted the bug-report-feedback branch October 6, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After submitting the bug, 'Bug Reported Successfully' message does not appear.
2 participants