diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -166,7 +166,10 @@ app.use(function (err, req, res, next) { | |||
166 | error = err.stack || err.message || err | 166 | error = err.stack || err.message || err |
167 | } | 167 | } |
168 | 168 | ||
169 | logger.error('Error in controller.', { err: error }) | 169 | // Sequelize error |
170 | const sql = err.parent ? err.parent.sql : undefined | ||
171 | |||
172 | logger.error('Error in controller.', { err: error, sql }) | ||
170 | return res.status(err.status || 500).end() | 173 | return res.status(err.status || 500).end() |
171 | }) | 174 | }) |
172 | 175 | ||