Skip to content

Commit 3bf69da

Browse files
committed
Don't show "Error undefined" for some 500 errors
1 parent 8e1aeea commit 3bf69da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/server-infra/error-handler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ module.exports = async (ctx, next) => {
2727
};
2828
} else {
2929
await ctx.render("error", {
30-
title: "Error " + err.status,
30+
title: "Error " + ctx.status,
3131
error: err,
3232
showMessage: err.expose && err.message !== statusMessage,
3333
isInternal: !err.expose,
34-
isConflict: err.status === 409,
34+
isConflict: ctx.status === 409,
3535
statusMessage,
3636
publicDataRepo: config.publicDataRepo.owner + "/" + config.publicDataRepo.name
3737
});

0 commit comments

Comments
 (0)