Skip to content

Commit

Permalink
fix: format Airbrake API errors for more readable Slack (#2781)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak authored Feb 15, 2024
1 parent 7757af5 commit dccadc0
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 dccadc0

Please sign in to comment.