Skip to content

Commit 0546545

Browse files
better error handling
1 parent ddff1d3 commit 0546545

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cloudinary/apiCaller.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,12 @@ const sendToCloudinary = (imagesArray, batchSize, dpr, metaData, quality, cb, ro
7979
analyzeResults.push(result);
8080
callback();
8181
}
82-
});
82+
}).catch(error => {
83+
logger.error('cloudinary upload error', error, rollBarMsg);
84+
});
8385
}, err => {
8486
if (uploadErrors.length > 0) {
85-
logger.error('cloudinary upload errors', JSON.stringify(uploadErrors), rollBarMsg);
87+
logger.error(`cloudinary upload errors: ${uploadErrors.length} issues`, rollBarMsg);
8688
}
8789
if (err) {
8890
cb({

0 commit comments

Comments
 (0)