aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-14 15:33:49 +0100
committerChocobozzz <me@florianbigard.com>2018-02-14 16:03:09 +0100
commite3a682a877a10833cb54ac3595e55110bda95647 (patch)
tree4c9e2e31be234720a72988f2e9ad8f4a002ec4c8 /server.ts
parenta0922eb9b3750ab6de31116531b625643930b38c (diff)
downloadPeerTube-e3a682a877a10833cb54ac3595e55110bda95647.tar.gz
PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.tar.zst
PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.zip
Handle thumbnail update
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/server.ts b/server.ts
index 529194a5e..c19ec4f19 100644
--- a/server.ts
+++ b/server.ts
@@ -158,8 +158,13 @@ app.use(function (req, res, next) {
158}) 158})
159 159
160app.use(function (err, req, res, next) { 160app.use(function (err, req, res, next) {
161 logger.error('Error in controller.', { error: err.stack || err.message || err }) 161 let error = 'Unknown error.'
162 res.sendStatus(err.status || 500) 162 if (err) {
163 error = err.stack || err.message || err
164 }
165
166 logger.error('Error in controller.', { error })
167 return res.status(err.status || 500).end()
163}) 168})
164 169
165// ----------- Run ----------- 170// ----------- Run -----------