Log failed image decoding

1ecc65f5fecb057e2fa67dadffc15475649330a6

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -1Ignore whitespace
src/endpoints/characters.js+2 -1
@@ -158,7 +158,8 @@ async function tryReadImage(imgPath, crop) {
158 return image;158 return image;
159 }159 }
160 // If it's an unsupported type of image (APNG) - just read the file as buffer160 // If it's an unsupported type of image (APNG) - just read the file as buffer
161 catch {161 catch (error) {
162 console.log(`Failed to read image: ${imgPath}`, error);
162 return fs.readFileSync(imgPath);163 return fs.readFileSync(imgPath);
163 }164 }
164}165}