Skip to content

RISE EDR Queries error too many locations #71

Description

@webb-ben

When Querying RISE for a larger geometry (bbox of Colorado) is appears to be very easy to overwhelm the API and temporarily receive rate limiting in the form of:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><HTML
xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<META name="GENERATOR" content="MSHTML 9.00.8112.16502"></HEAD>
<BODY>
<TABLE border="0" width="1024">
  <TBODY>
    <TD height="518" rowSpan="2" width="135">&nbsp;</TD>
    <TD height="386" width="718">
      <DIV align="center">
      <H3 class="StandardText">&nbsp;</H3>
      <H1 class="StandardText">This application is under maintenance and will be temporarily unavailable. </H1>
      <H2 class="StandardText">Please refer back to this page for updates and status. </H2>
      <P>&nbsp;</P>
      <H3><SPAN class="StandardText"><SPAN class="StandardText">We are sorry for any inconvenience</SPAN></SPAN></H3>
      <P>&nbsp;</P></DIV></TD>
    <TD rowSpan="2" width="149">&nbsp;</TD></TR>
  <TR>
    <TD height="21">&nbsp;</TD></TR>
  <TR>
    <TD height="21" colSpan="3">&nbsp;</TD></TR></TBODY></TABLE>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P></BODY></HTML>
, URL: https://data.usbr.gov/rise/api/result?itemId=4775&page=2&itemsPerPage=10000
[2025-04-22T09:41:40Z] {/Users/benwebb/Documents/GitHub/internetofwater/Western-Water-Datahub/packages/com/src/com/cache.py:30} ERROR - 200, message='Attempt to decode JSON with unexpected mimetype: text/html', url='https://data.usbr.gov/rise/api/result?itemId=4283&page=1&itemsPerPage=10000': Text: <U+FEFF><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">

It would be great if there was a retry mechanism and backoff strategy to still populate these requests without resulting in 500 Code response from the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RISEPertaining to the USBR RISE APIbugSomething isn't workingupstreamPertaining to an issue with an upstream API out of our control

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions