Skip to content

Commit

Permalink
JSON stringify error objects
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Feb 13, 2024
1 parent c233afe commit a0c36a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api.planx.uk/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const errorHandler: ErrorRequestHandler = (errorObject, _req, res, _next) => {
airbrake &&
(errorObject instanceof Error || errorObject instanceof ServerError)
) {
airbrake.notify(errorObject);
airbrake.notify(JSON.stringify(errorObject, null, 2));
return {
...errorObject,
message: errorObject.message.concat(", this error has been logged"),
Expand Down

0 comments on commit a0c36a0

Please sign in to comment.