-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Labels
bug reportThis issue reports a suspect bug or issue with the SDK itselfThis issue reports a suspect bug or issue with the SDK itself
Description
In case RateLimitException thrown it contains only -1 values for limit, remaing and reset
Running applications using management api to get a big amout of the information from auth0. Getting RateLimitException as expected, but it not contains proper information.
No workaround, cannot retry the requests
I've found that the server returns response headers in lower case, but the client is expecting it in different form (BaseRequest):
private RateLimitException createRateLimitException(Auth0HttpResponse response) {
// -1 as default value if the header could not be found.
long limit = Long.parseLong(response.getHeader("X-RateLimit-Limit", "-1"));
long remaining = Long.parseLong(response.getHeader("X-RateLimit-Remaining", "-1"));
long reset = Long.parseLong(response.getHeader("X-RateLimit-Reset", "-1"));
return new RateLimitException(limit, remaining, reset);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug reportThis issue reports a suspect bug or issue with the SDK itselfThis issue reports a suspect bug or issue with the SDK itself