diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/lazy-static.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/controllers/lazy-static.ts b/server/controllers/lazy-static.ts index 4285fd727..28d2f862a 100644 --- a/server/controllers/lazy-static.ts +++ b/server/controllers/lazy-static.ts | |||
@@ -49,7 +49,12 @@ async function getAvatar (req: express.Request, res: express.Response) { | |||
49 | 49 | ||
50 | logger.info('Lazy serve remote avatar image %s.', avatar.fileUrl) | 50 | logger.info('Lazy serve remote avatar image %s.', avatar.fileUrl) |
51 | 51 | ||
52 | await pushAvatarProcessInQueue({ filename: avatar.filename, fileUrl: avatar.fileUrl }) | 52 | try { |
53 | await pushAvatarProcessInQueue({ filename: avatar.filename, fileUrl: avatar.fileUrl }) | ||
54 | } catch (err) { | ||
55 | logger.warn('Cannot process remote avatar %s.', avatar.fileUrl, { err }) | ||
56 | return res.sendStatus(404) | ||
57 | } | ||
53 | 58 | ||
54 | avatar.onDisk = true | 59 | avatar.onDisk = true |
55 | avatar.save() | 60 | avatar.save() |