Send 404 if applink icon does not exist

This commit is contained in:
Johannes Zellner
2022-09-28 15:15:24 +02:00
parent ae376774e4
commit f5f9a8e520

View File

@@ -84,6 +84,7 @@ async function getIcon(req, res, next) {
const [error, icon] = await safe(applinks.getIcon(req.params.id, { original: req.query.original }));
if (error) return next(BoxError.toHttpError(error));
if (!icon) return next(new HttpError(404, 'no such icon'));
res.send(icon);
}