diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-14 15:33:49 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-14 16:03:09 +0100 |
commit | e3a682a877a10833cb54ac3595e55110bda95647 (patch) | |
tree | 4c9e2e31be234720a72988f2e9ad8f4a002ec4c8 /server.ts | |
parent | a0922eb9b3750ab6de31116531b625643930b38c (diff) | |
download | PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.tar.gz PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.tar.zst PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.zip |
Handle thumbnail update
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -158,8 +158,13 @@ app.use(function (req, res, next) { | |||
158 | }) | 158 | }) |
159 | 159 | ||
160 | app.use(function (err, req, res, next) { | 160 | app.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 ----------- |