OpenEnergyDashboard / OED

Open Energy Dashboard (OED)
Mozilla Public License 2.0
75 stars 263 forks source link

notify user if rate limit hit #1206

Open huss opened 5 months ago

huss commented 5 months ago

Is your feature request related to a problem? Please describe.

src/server/app.js has limits on the rate of certain types of requests but the OED user is not notified when the request fails for this reason.

Describe the solution you'd like

It would be nice to notify user if limit is hit and maybe to retry after a given delay. Care should be taken that the retry does not enter a bad loop as many are retried.

Describe alternatives you've considered

Leave as is

Additional context

Normally the rate limit is only hit by malicious use or coding/scripting errors. Thus, OED does not expect the limit to be hit (may happen rarely) for regular usage. Normally a retry would fix this.

huss commented 4 months ago

https://express-rate-limit.mintlify.app/reference/configuration has a message that should be sent back when the limit is hit. It may already be sent and it is a matter of displaying it in some way.

huss commented 3 weeks ago

The rate limiting code is mostly in src/server/app.js.

zhenga5 commented 2 days ago

Can I work on this issue.