origo icon indicating copy to clipboard operation
origo copied to clipboard

Search control fails silently on 429 (Too Many Requests)

Open MattiasSp opened this issue 10 months ago • 3 comments

Description When making too many requests to a search endpoint (such as Origo Server after https://github.com/origo-map/origo-server/pull/108/commits/580f9b8a0d15d02e046581590893e1390b370278) the client can recieve a 429 - Too Many Requests - response. The search control does not give the user any useful feedback in these cases, failing silently instead.

To Reproduce Steps to reproduce the behavior:

  1. Make more than 100 requests to an Origo Server endpoint within the 15 minute window using the Search control.
  2. See the client give no reaction at all, while logging the 429 error and VM2401:1 Uncaught (in promise) SyntaxError: Unexpected token 'T', "Too many r"... is not valid JSON to the console.

Expected behavior A discrete visual feedback about the cause of the error, perhaps even with info about "try again in X seconds".

MattiasSp avatar Apr 22 '24 07:04 MattiasSp