I noticed recently that the request (created from updateEventFromWaiRequest) is {} in our Bugsnag:
After some debugging, I think what is happening is that request headers are being serialized as an array, whereas Bugsnag expects an object. In the API docs here, the example has headers as an empty object {} (and that's also how it is in the screenshot). But if you use ghci to print the JSON:
So, I think this should be a fairly easy fix. I think possible options are:
Manually write the toJSON instance for BugsnagRequest.
Change the type of brHeaders to something else with a different FromJSON instance. This is a breaking change, but a possible upside is it could help remove the need for the orphan ToJSON instances for Bytestring and CI
I noticed recently that the request (created from
updateEventFromWaiRequest
) is{}
in our Bugsnag:After some debugging, I think what is happening is that request headers are being serialized as an array, whereas Bugsnag expects an object. In the API docs here, the example has
headers
as an empty object{}
(and that's also how it is in the screenshot). But if you use ghci to print the JSON:So, I think this should be a fairly easy fix. I think possible options are:
BugsnagRequest
.brHeaders
to something else with a differentFromJSON
instance. This is a breaking change, but a possible upside is it could help remove the need for the orphan ToJSON instances forBytestring
andCI