mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added a catch in promise for Jimp read
This commit is contained in:
committed by
GitHub
parent
21947a2717
commit
0a1f800659
@@ -701,6 +701,14 @@ function sendColor(coll, socket, url, ajax, res) {
|
||||
io.to(coll).emit("color", {color: c, only: false});
|
||||
}
|
||||
}
|
||||
}).catch(function(err) {
|
||||
console.log("Crashed on fetching image, url is " + url);
|
||||
console.log("Is ajax: " + ajax);
|
||||
if(ajax) {
|
||||
res.header({"Content-Type": "application/json"});
|
||||
res.status(404);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user