removed unnecessary try/catch from utils

This commit is contained in:
Aster Fialla
2026-02-24 19:49:59 -05:00
parent a1e007448f
commit fb878222dd

View File

@@ -28,15 +28,10 @@ u.checkImageFormatValidity = async function (imageUrl) {
throw new Error(`${enums.err.PROPIC_CANNOT_LOAD}: ${e.message}`);
}
try {
blobFile = await response.blob();
if (blobFile.size > 10000000 || !acceptableImages.includes(blobFile.type)) throw new Error(enums.err.PROPIC_FAILS_REQUIREMENTS);
blobFile = await response.blob();
if (blobFile.size > 10000000 || !acceptableImages.includes(blobFile.type)) throw new Error(enums.err.PROPIC_FAILS_REQUIREMENTS);
return true;
}
catch(error) {
throw new Error(error.message);
}
return true;
}
export const utils = u;