Skip to content

Commit

Permalink
Add error message to error log
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshschuler committed May 26, 2023
1 parent 6018467 commit 67d52fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/middleware/handleError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function handleError(ctx: RouterContext<string>, 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." };
Expand Down

0 comments on commit 67d52fd

Please sign in to comment.