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

Instead of throwing the 400 error generically, provide the census API output and document the URL behavior #33

Closed
ljwolf opened this issue Nov 26, 2018 · 3 comments

Comments

@ljwolf
Copy link
Member

ljwolf commented Nov 26, 2018

Right now, any time there's an error in the way the query is constructed, we're throwing generic 400 errors and providing the exact query url.

It might be more helpful if I customized these errors to get the actual text from the census API. This would mean that you'd get the "real" reason the error is thrown according to the census, rather than the generic HTTP status code, which is always 400 when an invalid query is run.

This would let users (like Yoonjung, who emailed @ljwolf about a 400 error relating to this query) see the error locally, and avoid incentivising going out of the notebook to open the website.

@dfolch
Copy link
Contributor

dfolch commented Jan 6, 2019

+1 on this. I was "sure" that my failed query was due to picking the wrong database. Turns out that in 2017 GEOID is GEO_ID. Manually pasting the failed query into a web browser revealed my mistake.

Since the code already returns the failed URI, maybe a quick solution is to add some text to the output advising the user to paste the URI into a web browser to get details on the source of the failure. It didn't occur to me to do this until reading this issue.

@ljwolf
Copy link
Member Author

ljwolf commented Jan 6, 2019

Thanks for this bump. Looked into this back on a trans-atlantic plane in December & fixed it, but couldn't test it.

Pushed into #35, but will need to test.

@ljwolf
Copy link
Member Author

ljwolf commented Mar 15, 2019

resolved by #35

@ljwolf ljwolf closed this as completed Mar 15, 2019
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

2 participants