You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When rate limiting is encountered, an Auth0::Unsupported exception is raised, whose message only states {"statusCode":429,"error":"Too Many Requests"}. This is because the exception message is generated from only the HTTP response's status and body.
When the Auth0 API returns a 429 response, it includes details about the limits in HTTP response headers; specifically, as noted in Rate Limits, the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
It would be good to return this information to the caller when raising an exception due to rate limiting.
Are you reporting this to the correct repository? See also the OmniAuth-Auth0 strategy for logging in with Rails.
Are there any related or duplicate Issues or PRs for this issue?
Environment
Please provide the following:
Ruby Auth0 version: 4.6.0
Ruby version: 2.4.4
Rails version (if applicable): N/A
Browser version (if applicable): N/A
Additional gems that might be affecting your instance: N/A
Reproduction
Easiest way to reproduce is to use a free/trial account with a low rate limit, and then repeatedly call Auth0::Api::V2#logs until an exception is raised.
The text was updated successfully, but these errors were encountered:
Actually, it might be generally a good idea to make all of the exceptions that Auth0::Mixins::HTTPProxy can raise, inherit from a common Auth0::HTTPError, and provide access to either the RestClient::ExceptionWithResponse or at least the RestClient::Response object in addition to the normal message.
Description
When rate limiting is encountered, an
Auth0::Unsupported
exception is raised, whose message only states{"statusCode":429,"error":"Too Many Requests"}
. This is because the exception message is generated from only the HTTP response's status and body.When the Auth0 API returns a 429 response, it includes details about the limits in HTTP response headers; specifically, as noted in Rate Limits, the
X-RateLimit-Limit
,X-RateLimit-Remaining
andX-RateLimit-Reset
headers.It would be good to return this information to the caller when raising an exception due to rate limiting.
Prerequisites
Environment
Please provide the following:
Reproduction
Easiest way to reproduce is to use a free/trial account with a low rate limit, and then repeatedly call
Auth0::Api::V2#logs
until an exception is raised.The text was updated successfully, but these errors were encountered: