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

Investigate JS errors captured in New Relic #1484

Closed
jseppi opened this Issue Mar 9, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@jseppi

This comment has been minimized.

Contributor

jseppi commented Mar 10, 2017

So those two first errors are due to this line in autocomplete.js: https://github.com/18F/calc/blob/develop/frontend/source/js/data-explorer/autocomplete.js#L74

From what I can gather of the New Relic traces, it happens when the api.data.gov proxy is having problems such that a non-400+ response code is returned, but the body doesn't seem to have any content.

I think we could easily guard against it by changing the previous line to include a check on result, like so:

if (error || !result) { return done([]); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment