aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/cache.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/middlewares/cache.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/middlewares/cache.ts')
-rw-r--r--server/middlewares/cache.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/middlewares/cache.ts b/server/middlewares/cache.ts
index b40486e4b..1b44957d3 100644
--- a/server/middlewares/cache.ts
+++ b/server/middlewares/cache.ts
@@ -31,6 +31,8 @@ function cacheRoute (lifetimeArg: string | number) {
31 logger.error('Cannot cache route.', { err }) 31 logger.error('Cannot cache route.', { err })
32 return done(err) 32 return done(err)
33 }) 33 })
34 } else {
35 done()
34 } 36 }
35 37
36 return sendSave(body) 38 return sendSave(body)
@@ -52,7 +54,7 @@ function cacheRoute (lifetimeArg: string | number) {
52 return done() 54 return done()
53 }) 55 })
54 } catch (err) { 56 } catch (err) {
55 logger.error('Cannot serve cached route.', err) 57 logger.error('Cannot serve cached route.', { err })
56 return next() 58 return next()
57 } 59 }
58 } 60 }