Skip to content

Commit 2a7a67d

Browse files
committed
Fix createExpressError
1 parent 1c90464 commit 2a7a67d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

controllers/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const index = function (req, res, next) {
101101

102102
function createExpressError(err) {
103103
let error = {
104-
statusCode: err.statusCode ?? err.code ?? 500,
104+
statusCode: err.statusCode ?? err.status ?? 500,
105105
statusMessage: err.statusMessage ?? err.message ?? "There was an error that prevented this request from completing successfully."
106106
}
107107
if (err.code === 11000) {

0 commit comments

Comments
 (0)