fix(ui): throw on fetch err when copying image

This commit is contained in:
psychedelicious 2023-10-05 08:03:21 +11:00
parent 8b7f8eaea2
commit 3f4ea073d1

View File

@ -25,6 +25,9 @@ export const useCopyImageToClipboard = () => {
try {
const getImageBlob = async () => {
const response = await fetch(image_url);
if (!response.ok) {
throw new Error(`Problem retrieving image data`);
}
return await response.blob();
};