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

Handling Malformed URI #65

Open
bryanterrell opened this issue Oct 4, 2019 · 0 comments
Open

Handling Malformed URI #65

bryanterrell opened this issue Oct 4, 2019 · 0 comments

Comments

@bryanterrell
Copy link

Currently react-metrics throws an exception on this line when the site URI is malformed with an invalid query string:
https://github.com/nfl/react-metrics/blob/master/src/core/createMetrics.js#L13

Ideally, querystring.decode would be wrapped in a try/catch, spit the error out in the console and set qs to {} so that the site doesn't partially render due to the unhandled js exception.

We are also trying to correct the invalid query string coming into our site, but we ideally would still render a working site even if the query string is malformed.

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