bugsnag-api-ruby
bugsnag-api-ruby copied to clipboard
Handle multiple errors in response
Goal
Include lists of errors as returned from some API endpoints (eg. configure an integration) in raised Bugsnag::Api::Error messages.
Design
Added secondary check for errors in order to maintain existing error message for possible compatibility reasons.
Changeset
- Added secondary check for
errors - Tidied up whitespace, unused variables and docs
Testing
Manually tested with:
Bugsnag::Api::Client.new
Bugsnag::Api.get("projects/test/configured_integrations")
which raises:
Bugsnag::Api::Unauthorized:
GET https://api.bugsnag.com/projects/test/configured_integrations: 401 - Errors: ["Authentication Required"]