bugsnag / bugsnag-ruby

BugSnag error monitoring & reporting software for rails, sinatra, rack and ruby
https://docs.bugsnag.com/platforms/ruby
MIT License
249 stars 174 forks source link

Add 'payloadVersion' to report body #738

Closed imjoehaines closed 2 years ago

imjoehaines commented 2 years ago

Goal

This is currently reported in a header, but the Event API prefers it to be in the request body. Supplying it in both is recommended by the docs: https://bugsnagerrorreportingapi.docs.apiary.io/#reference/0/notify/send-error-reports

image

The other motivation for this change is to allow the Maze Runner tests to use the built in the error payload contains the payloadVersion {string} step, which only supports the payload being the body:

https://github.com/bugsnag/maze-runner/blob/53be8d2e47440832e5b0466bf39db391cfd21c8a/lib/features/steps/error_reporting_steps.rb#L90-L105

We could update Maze Runner to support reading the header as well, but I think ti makes more sense to update the notifier when the body is preferred by the API