X-RateLimit* headers should be optional
ryan-barker-zefr opened this issue · 2 comments
ryan-barker-zefr commented
Currently, WebhookClient::update0 requires 3 response headers to prevent a NPE.
X-RateLimit-Remaining
X-RateLimit-Limit
X-RateLimit-Reset-After
This causes NullPointerException when pointing to a mock discord server
Easiest solution is to provide a sensible default using response.header(key,value) instead of response.header(key)
MinnDevelopment commented
Your mock server should serve the rate limit headers. It is not the job of the library to mock your rate limits for you.
MinnDevelopment commented
The NullPointerException wasn't really an issue but I removed it to make logs a little less frightening. This is addressed in 0.5.7 and the release should appear on maven central within the next hours.