SwitchBotAPI icon indicating copy to clipboard operation
SwitchBotAPI copied to clipboard

Change Rate Limiting response to 429

Open asknoone opened this issue 2 years ago • 0 comments

Current Situation

The documentation mentions that after 10000 requests per day it returns "Unauthorized".

Proposed Change

May I suggest that instead an http response code of 429 be returned, as that is the intended purpose of this http code.

It will help people differentiate between authentication errors etc, versus rate limiting.

For example, where they have looping code and don't realise they have maxed out their limit. Or perhaps they have just set their code to poll too frequently instead of using webhooks.

Additional Context

No response

asknoone avatar Oct 17 '22 09:10 asknoone