aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-31 11:43:46 +0200
committerChocobozzz <me@florianbigard.com>2018-08-31 11:43:46 +0200
commit328e607d32d7f1e960f8966a70097b030e386ab4 (patch)
tree348297cadda55d616ece20a39ff1a827ece0c7d8 /server.ts
parentd6ca951b3cc7cb19ad9f52249444fc68c5d81d50 (diff)
downloadPeerTube-328e607d32d7f1e960f8966a70097b030e386ab4.tar.gz
PeerTube-328e607d32d7f1e960f8966a70097b030e386ab4.tar.zst
PeerTube-328e607d32d7f1e960f8966a70097b030e386ab4.zip
Add sql trace in error log on sequelize error
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server.ts b/server.ts
index eccd19919..2db39ab06 100644
--- a/server.ts
+++ b/server.ts
@@ -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