Skip to content

Commit

Permalink
add error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sashankaryal committed Nov 22, 2024
1 parent e5eb5de commit 3165f1e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/packages/looker/src/worker/disk-overlay-decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,15 @@ export const decodeOverlayOnDisk = async (
return;
}

const overlayMask = await decodeWithCanvas(overlayImageBlob);
let overlayMask: OverlayMask;

try {
overlayMask = await decodeWithCanvas(overlayImageBlob);
} catch (e) {
console.error(e);
return;
}

const [overlayHeight, overlayWidth] = overlayMask.shape;

// set the `mask` property for this label
Expand Down

0 comments on commit 3165f1e

Please sign in to comment.