Skip to content

Commit

Permalink
fix: error-handler middleware 采用 send 方法代替 json 方法
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucifier129 committed Jun 12, 2024
1 parent afc957f commit a5fa204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion start/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ module.exports = async function start(options) {
// no stacktraces leaked to user
app.use(function (err, req, res, next) {
res.status(err.status || 500)
res.json(err.message)
res.send(err.message)
})
}

Expand Down

0 comments on commit a5fa204

Please sign in to comment.