mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-16 21:27:30 +00:00
Listen for sharp errors
This commit is contained in:
parent
a668547735
commit
608b3a34fc
@ -38,6 +38,9 @@ module.exports = [
|
|||||||
*/
|
*/
|
||||||
return request(verifyResult.url, {}, {log: false}).then(res => {
|
return request(verifyResult.url, {}, {log: false}).then(res => {
|
||||||
const converter = sharp().resize(width, width, {position: "entropy"})
|
const converter = sharp().resize(width, width, {position: "entropy"})
|
||||||
|
converter.on("error", error => {
|
||||||
|
console.error("Sharp instance emitted an error:", error)
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
statusCode: 200,
|
statusCode: 200,
|
||||||
contentType: "image/jpeg",
|
contentType: "image/jpeg",
|
||||||
|
Loading…
Reference in New Issue
Block a user