Skip to content

Commit e047ce6

Browse files
authored
improve general error 500 handling (projectwallace#20)
1 parent 69ecc54 commit e047ce6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ module.exports = async (req, res) => {
3737
} catch (error) {
3838
res.statusCode = 500
3939
res.setHeader('Content-Type', 'application/json')
40-
41-
return res.end(JSON.stringify(error))
40+
return res.send({message: error.message})
4241
}
4342
}

0 commit comments

Comments
 (0)