lib/bugsnag/api/error.rb in bugsnag-api-1.0.3 vs lib/bugsnag/api/error.rb in bugsnag-api-2.0.0

- old
+ new

@@ -21,10 +21,11 @@ when 405 then Bugsnag::Api::MethodNotAllowed when 406 then Bugsnag::Api::NotAcceptable when 409 then Bugsnag::Api::Conflict when 415 then Bugsnag::Api::UnsupportedMediaType when 422 then Bugsnag::Api::UnprocessableEntity + when 429 then Bugsnag::Api::RateLimitExceeded when 400..499 then Bugsnag::Api::ClientError when 500 then Bugsnag::Api::InternalServerError when 501 then Bugsnag::Api::NotImplemented when 502 then Bugsnag::Api::BadGateway when 503 then Bugsnag::Api::ServiceUnavailable @@ -99,9 +100,12 @@ # Raised when Bugsnag returns a 414 HTTP status code class UnsupportedMediaType < ClientError; end # Raised when Bugsnag returns a 422 HTTP status code class UnprocessableEntity < ClientError; end + + # Raised when the api limit has been exceeded + class RateLimitExceeded < ClientError; end # Raised on errors in the 500-599 range class ServerError < Error; end # Raised when Bugsnag returns a 500 HTTP status code