fix: don't let lack of photo data go unnoticed

This commit is contained in:
siiky 2025-06-17 11:55:09 +01:00
parent 77347ff29c
commit 7d9df01eab

View file

@ -692,7 +692,7 @@ const updateFailedQRScans = (deviceId, frames) => {
function createPhoto(name, data, dir) { function createPhoto(name, data, dir) {
if (!data) { if (!data) {
logger.error(`Diagnostics error: No data to save for ${name} photo`) logger.error(`Diagnostics error: No data to save for ${name} photo`)
return Promise.resolve() return Promise.reject()
} }
const decodedImageData = Buffer.from(data, 'base64') const decodedImageData = Buffer.from(data, 'base64')