mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix error log
This commit is contained in:
@@ -82,7 +82,8 @@ async function writeCharacterData(inputFile, data, outputFile, request, crop = u
|
|||||||
|
|
||||||
return await tryReadImage(inputFile, crop);
|
return await tryReadImage(inputFile, crop);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`Failed to read image: ${inputFile}. Using a fallback image.`);
|
const message = Buffer.isBuffer(inputFile) ? 'Failed to read image buffer.' : `Failed to read image: ${inputFile}.`;
|
||||||
|
console.warn(message, 'Using a fallback image.', error);
|
||||||
return await fs.promises.readFile(defaultAvatarPath);
|
return await fs.promises.readFile(defaultAvatarPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user