The RateLimitException detection is working perfectly, but unfornately the current implementation forgets to close a response body, hence the following warning in the logs:
WARNING: A connection to https://<ommited>.auth0.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);
Simply moving the check on the 429 http status to inside the try-with-resources statement just below is enough to ensure the response body gets properly closed.