From 67d52fdda4a7fe63cc0bfea1da4b113aebe8020a Mon Sep 17 00:00:00 2001 From: jamesschuler Date: Fri, 26 May 2023 14:33:27 -0700 Subject: [PATCH] Add error message to error log --- api/src/middleware/handleError.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/middleware/handleError.ts b/api/src/middleware/handleError.ts index 4d25415..03f0391 100644 --- a/api/src/middleware/handleError.ts +++ b/api/src/middleware/handleError.ts @@ -5,7 +5,7 @@ export async function handleError(ctx: RouterContext, next: () => Promis try { await next(); } catch (err) { - await logError("Application Error", { ...err }); + await logError("Application Error", { ...err, message: err.message }); ctx.response.status = 500; ctx.response.body = { message: "Something went wrong processing your request. Please try again later." };