From 608b3a34fc804a13980a680ff63ae6f745b6b44e Mon Sep 17 00:00:00 2001 From: Cadence Fish Date: Tue, 18 Feb 2020 14:10:04 +1300 Subject: [PATCH] Listen for sharp errors --- src/site/api/proxy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/site/api/proxy.js b/src/site/api/proxy.js index 6ab739d..bb11b80 100644 --- a/src/site/api/proxy.js +++ b/src/site/api/proxy.js @@ -38,6 +38,9 @@ module.exports = [ */ return request(verifyResult.url, {}, {log: false}).then(res => { const converter = sharp().resize(width, width, {position: "entropy"}) + converter.on("error", error => { + console.error("Sharp instance emitted an error:", error) + }) return { statusCode: 200, contentType: "image/jpeg",