Skip to content

Commit 2bc16ee

Browse files
committed
Modified Base Request
1 parent c15a250 commit 2bc16ee

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/main/java/com/auth0/net/BaseRequest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,8 @@ private RateLimitException createRateLimitException(Auth0HttpResponse response)
220220
long remaining = Long.parseLong(response.getHeader("x-ratelimit-remaining", "-1"));
221221
long reset = Long.parseLong(response.getHeader("x-ratelimit-reset", "-1"));
222222

223-
TokenQuotaBucket clientQuotaLimit = null;
224-
TokenQuotaBucket organizationQuotaLimit = null;
225-
226-
if (remaining == 0) {
227-
clientQuotaLimit = HttpResponseHeadersUtils.getClientQuotaLimit(response.getHeaders());
228-
organizationQuotaLimit = HttpResponseHeadersUtils.getOrganizationQuotaLimit(response.getHeaders());
229-
}
223+
TokenQuotaBucket clientQuotaLimit = HttpResponseHeadersUtils.getClientQuotaLimit(response.getHeaders());
224+
TokenQuotaBucket organizationQuotaLimit = HttpResponseHeadersUtils.getOrganizationQuotaLimit(response.getHeaders());
230225

231226
String payload = response.getBody();
232227
MapType mapType = mapper.getTypeFactory().constructMapType(HashMap.class, String.class, Object.class);

0 commit comments

Comments
 (0)