Skip to content

429 Too Many Requests messages is not printing #837

@ldecicco-USGS

Description

@ldecicco-USGS

This is a pretty edge case, but when I ran the following without my API key, I got this error:

test <- read_waterdata_continuous(
   monitoring_location_id = "USGS-15300500",
   time = "../2023-10-01T21:00:00Z"
)

Requesting:
https://api.waterdata.usgs.gov/ogcapi/v0/collections/continuous/items?f=json&lang=en-US&skipGeometry=TRUE&monitoring_location_id=USGS-15300500&time=..%2F2023-10-01T21%3A00%3A00Z&limit=50000
Error in walk_pages(req) : HTTP 429 Too Many Requests.

When I try it with no_paging = TRUE, I get a little more info on what I need to do:

test <- read_waterdata_continuous(
   monitoring_location_id = "USGS-15300500",
   time = "../2023-10-01T21:00:00Z",
   no_paging = TRUE
)
Requesting:
https://api.waterdata.usgs.gov/ogcapi/v0/collections/continuous/items?f=csv&lang=en-US&skipGeometry=TRUE&monitoring_location_id=USGS-15300500&time=..%2F2023-10-01T21%3A00%3A00Z&limit=50000
Error in `httr2::req_perform()` at dataRetrieval/R/walk_pages.R:110:3:
! HTTP 429 Too Many Requests.You have exceeded your rate limit. Make sure you provided your API key
  from https://api.waterdata.usgs.gov/signup/, then either try again later
  or contact us at
  https://waterdata.usgs.gov/questions-comments/?referrerUrl=https://api.waterdata.usgs.gov
  for assistance.

Possible to make the behavior the same across scenarios?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions