From a0c36a0867881a4409d387c37722b3859f08a971 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Tue, 13 Feb 2024 17:24:56 +0100 Subject: [PATCH] JSON stringify error objects --- api.planx.uk/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.planx.uk/server.ts b/api.planx.uk/server.ts index 649e615984..b2842216f0 100644 --- a/api.planx.uk/server.ts +++ b/api.planx.uk/server.ts @@ -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"),