Pagination cursor for /alerts endpoint returns empty result set #799
Unanswered
carstenpiepel
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, Everyone:
I noticed that the pagination cursor provided as an output of the
/alerts
endpoint sometimes returns an empty result set. Here is an example from yesterday:https://api.weather.gov/alerts?limit=5&cursor=eyJ0IjoxNzQwNTQ0OTIwLCJpIjoidXJuOm9pZDoyLjQ5LjAuMS44NDAuMC40NTZkODMxMTY1YTU2OGQ2ZDg1YWQ4ZDEzYTQ4M2FmZTA0ZTFkNGY5LjAwNy4xIn0%3D
It simply returns an empty feature collection, which is not expected:
Small limits, such as 5 or 10, make this behavior easy to observe. After a few iterations of paging through the available alerts, the API web service reliably returns an empty result set.
I am confident that the cursor has not yet reached the end of the available results. That is not how pagination appears to work with the API. The last results page includes a cursor that returns to the beginning of the results.
I wonder if it has something to do with caching, where cache invalidation also invalidates all pagination cursors, but that's just a guess. I'd like to understand whether what I am seeing is expected behavior or not, please.
Beta Was this translation helpful? Give feedback.
All reactions