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 message bubbling up to browser console #333

Open
HonkingGoose opened this issue Aug 14, 2021 · 2 comments
Open

Error message bubbling up to browser console #333

HonkingGoose opened this issue Aug 14, 2021 · 2 comments
Assignees
Labels
bug Bug fix of existing functionality

Comments

@HonkingGoose
Copy link
Collaborator

Describe the bug

Error message bubbling up to browser console log.

Give the steps to reproduce

The idea here is basically that a user is making a query string by hand to get around the pre-fetched versions in the comparator interface.

Steps to reproduce:

  1. User manually creates a bad query string: https://octoclairvoyant.vercel.app/comparator?repo=renovatebot%2Frenovate&from=v.1.0.0&to=latest See how v.1.0.0 is not a valid version, it should be v1.0.0 of course.
  2. See page with message: Application error: a client-side exception has occurred (see the browser console for more information).
  3. Go to browser developer tools, see error message: TypeError: Invalid Version: v.1.0.0

What browsers are you seeing the problem on?

Firefox

Have you thought of a possible solution?

Yes

If you have thought of a solution, please tell us about it!

I think we need to wrap the relevant code in a try/catch block, and capture this kind of bad input, and prevent it from bubbling up to the browser window console log.

Do you want to help fix the bug?

No

Is there anything else we need to know?

No response

@HonkingGoose HonkingGoose added bug Bug fix of existing functionality status:requirements labels Aug 14, 2021
@Belco90
Copy link
Member

Belco90 commented Aug 15, 2021

I see. We need to wrap the App component with react-error-boundary, and then 1) give the user the option to reset the comparator and 2) send the error caught to Sentry.

@HonkingGoose
Copy link
Collaborator Author

That react-error-boundary tool seems nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fix of existing functionality
Projects
Status: Todo
Development

No branches or pull requests

2 participants