File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ print(f"Found {len(flowlines)} upstream tributaries within 50km")
202202- ** Latest daily values** : Most recent daily statistical summary data
203203- ** Latest instantaneous values** : Most recent high-frequency continuous data
204204- ** Samples data** : Discrete USGS water quality data
205- - ** Instantaneous values** (: alarm_clock : * COMING SOON* ): High-frequency continuous data
205+ - ** Instantaneous values** (* COMING SOON* ): High-frequency continuous data
206206
207207### Legacy NWIS Services (Deprecated)
208208- ** Daily values (dv)** : Legacy daily statistical data
Original file line number Diff line number Diff line change @@ -309,11 +309,16 @@ def _error_body(resp: requests.Response):
309309 predefined message indicating possible reasons for denial. For other
310310 status codes, returns the raw response text.
311311 """
312- if resp .status_code == 429 :
312+ status = resp .status_code
313+ if status == 429 :
313314 return "429: Too many requests made. Please obtain an API token or try again later."
314- elif resp . status_code == 403 :
315+ elif status == 403 :
315316 return "403: Query request denied. Possible reasons include query exceeding server limits."
316- return f"{ resp .status_code } : { resp .json ().get ('code' , 'Unknown type' )} . { resp .json ().get ('description' , "No description provided" )} ."
317+ j_txt = resp .json ()
318+ return (
319+ f"{ status } : { j_txt .get ('code' , 'Unknown type' )} . "
320+ f"{ j_txt .get ('description' , 'No description provided' )} ."
321+ )
317322
318323
319324def _construct_api_requests (
You can’t perform that action at this time.
0 commit comments