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
Note that both Rollbar.itemServer and Rollbar.itemPlatform are listed as Maybes in the Rollbar.Client docs. And yet, we get this error. The ellipsis is irrelevant stuff
(StatusCodeException (Response {responseStatus = Status {statusCode = 422, statusMessage = "Unprocessable Entity"}, ... "{\n \"err\": 1,\n \"message\": \"Invalid format. data.platform should be string. data.server should be object.\"\n}")))
and noticed that platform, server, and other Nothings were serialized as {"server":null, "platform":null, ...}, which seems to make rollbar api unhappy.
The text was updated successfully, but these errors were encountered:
A starting point for anyone that wants to tackle this issue: the create item docs of the Rollbar API states that some of the fields are optional, so instead of being serialized as "server": null or "platform": null like what's currently happening, they should be left out of the request when set to Nothing. This should be reflected in the ToJSON Item instance.
We are using katip for logging. So we want to create a Rollbar.Item from a Katip.Item and we have this function
Note that both
Rollbar.itemServer
andRollbar.itemPlatform
are listed asMaybe
s in the Rollbar.Client docs. And yet, we get this error. The ellipsis is irrelevant stuff(StatusCodeException (Response {responseStatus = Status {statusCode = 422, statusMessage = "Unprocessable Entity"}, ... "{\n \"err\": 1,\n \"message\": \"Invalid format. data.platform should be string. data.server should be object.\"\n}")))
So we did
and noticed that platform, server, and other
Nothing
s were serialized as{"server":null, "platform":null, ...}
, which seems to make rollbar api unhappy.The text was updated successfully, but these errors were encountered: