You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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>
The text was updated successfully, but these errors were encountered:
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
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>
The text was updated successfully, but these errors were encountered: