X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fcache.ts;h=1b44957d3004ac8106ea30df3620d5150e35eb53;hb=a585824160d016db7c9bff0e1cb1ffa3aaf73d74;hp=b40486e4bf3b953f83e907d500e4c8117f8a40b9;hpb=06215f15e0a9fea2ef95b8b49cb2b5868fb64017;p=github%2FChocobozzz%2FPeerTube.git 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) { logger.error('Cannot cache route.', { err }) return done(err) }) + } else { + done() } return sendSave(body) @@ -52,7 +54,7 @@ function cacheRoute (lifetimeArg: string | number) { return done() }) } catch (err) { - logger.error('Cannot serve cached route.', err) + logger.error('Cannot serve cached route.', { err }) return next() } }