auth0 / auth0-java

Java client library for the Auth0 platform
https://auth0.com
MIT License
290 stars 131 forks source link

propagate error message on rate limit exception #579

Closed jimmyjames closed 11 months ago

jimmyjames commented 11 months ago

Changes

Prior to this change, any error messages returned from Auth0 APIs caused by a 429 (rate limit exceeded) were not propagated to the exception. This change updates the RateLimitException class to accept message parameters, populates those values from the response, and updates the RateLimitInterceptor to not eagerly close responses on retry, which was causing the inability to retrieve the response body (it was already closed).