Skip to content

Commit

Permalink
Throw if image fetch had no body
Browse files Browse the repository at this point in the history
  • Loading branch information
sirbrillig committed Dec 17, 2024
1 parent 9bc9b0f commit 023e420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/lib/github-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function getRawImage(
: await fetch(imgUrl);
const reader = response.body?.getReader();
if (!reader) {
return [];
throw new Error(`No image body found for ${imgUrl} (${account.id})`);
}
// @todo is this the right type?
const arr: Uint8Array[] = [];
Expand Down

0 comments on commit 023e420

Please sign in to comment.