return statement after reject

This commit is contained in:
Marc-Roig 2022-08-05 11:51:47 +02:00 committed by Pierre Noël
parent 3175e47cdf
commit 286f9b2e23

View File

@ -30,8 +30,10 @@ module.exports = {
if (err) {
if (err.message.includes('File size too large')) {
reject(new PayloadTooLargeError());
} else {
reject(new Error(`Error uploading to cloudinary: ${err.message}`));
}
reject(new Error(`Error uploading to cloudinary: ${err.message}`));
return;
}
if (image.resource_type === 'video') {