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

Better 414 Response Error Message #65

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

elbeejay
Copy link
Contributor

This PR closes #64.

It is pretty straightforward, we handle the 414 response case in query() and print out a custom error message to convey to the user that the API query generated by their function call is too long. Previous error message was not useful to the end-user, per #64.

This PR also adds a corresponding unit test which checks that both the expected error type and message are captured when trying to perform a query with a URL that is too long.

@elbeejay elbeejay added the enhancement New feature or request label Dec 19, 2022
@thodson-usgs thodson-usgs merged commit 4f9cb41 into DOI-USGS:master Dec 20, 2022
elbeejay added a commit to elbeejay/dataretrieval-1 that referenced this pull request Dec 28, 2022
thodson-usgs pushed a commit that referenced this pull request Dec 28, 2022
* add hydorshare notebooks to rendered docs

* matplotlib for docs

* improve some doc-strings

* fix nadp url, improve doc-strings, add nadp tests

* minor linting

* try-except due to gdal on ci

* improvements to doc-strings

* minor linting

* linting waterwatch

* doc-string examples, formatting, tests for wqp

* ignore link to docs page that doesnt exist yet

* linting and doc-strings for streamstats

* doc-strings and linting

* doc-strings and examples

* complete get_record doc-string

* fix examples in nwis doc-strings

* document data portals (#33)

* add county example for water_use (#46)

* pseudo-code example for large queries in warning (#65)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error parsing JSON
2 participants