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

requesting rdb data from nonexistent site returns uncaught error #71

Closed
mroberge opened this issue Jun 11, 2020 · 0 comments
Closed

requesting rdb data from nonexistent site returns uncaught error #71

mroberge opened this issue Jun 11, 2020 · 0 comments

Comments

@mroberge
Copy link
Owner

  • HydroFunctions version: 0.1.8dev

Description

Requesting data from a non-existent site will return a status code of 200, so everything is fine, you would think. But instead of returning an RDB table, you get a webpage with an error.

This link is for a non-existent site, 01581000:
https://waterdata.usgs.gov/pa/nwis/measurements?site_no=01581000&agency_cd=USGS&format=rdb_expanded

What I Did

hf.field_meas('01581000')

Possible Solution

Create a system for requesting data from the USGS that also handles errors.
Check for non-200 errors
Check the text in 200 codes for a <title>USGS NwisWeb error message</title>

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