PteroPackages / PteroJS

A verbose API library for Pterodactyl
https://pteropackages.github.io/PteroJS/
MIT License
41 stars 11 forks source link

Ratelimit system #18

Open devnote-dev opened 2 years ago

devnote-dev commented 2 years ago

Currently there is no proper ratelimit system for HTTP requests, all 4xx responses are treated as PteroAPIErrors and are subsequently thrown. Ratelimit responses should be a special case which suspends all requests until the ratelimit is over, this can be tracked via the X-Ratelimit-Limit and X-Ratelimit-Remaining headers.