chore: server code formatting
This commit is contained in:
parent
aedabcbdee
commit
68517170e2
234 changed files with 9824 additions and 6195 deletions
|
|
@ -1,9 +1,7 @@
|
|||
const logger = require('../logger')
|
||||
|
||||
function errorHandler (err, req, res, next) {
|
||||
const statusCode = err.name === 'HTTPError'
|
||||
? err.code || 500
|
||||
: 500
|
||||
function errorHandler(err, req, res) {
|
||||
const statusCode = err.name === 'HTTPError' ? err.code || 500 : 500
|
||||
|
||||
const json = { error: err.message }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue