Closed hubertpompecki closed 6 years ago
EDIT: I decided to use raven_context
instead of the error message itself to avoid long and unreadable error messages. Whilst at it, I have also added raven_context
to FlexCommerceApi::Error::InternalServer
so that we have more visibility into all kinds of internal server errors as well.
Currently, when the gem fails to parse json received from the back-end it throws errors looking like the following:
The message above does not include the malformed payload and the payload is not included in server logs either because we don't have logging enabled for the front-end.
This PR extends the json_api_client gem on which the flex-rub-gem relies to include malformed json bodies as Sentry context in any
JSON::ParserError
errors it throws.