Skip to content

Commit

Permalink
Add more debug deconstruction (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyll authored Feb 27, 2024
1 parent abf7ac8 commit 4790b29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function throwError(response: Response) {
let message: string | undefined;
try {
const data = await response.json();
message = data.message;
message = data.message ?? data.error.message ?? data.error;
} catch {}

message ??= `Error ${response.status}: ${response.statusText}`;
Expand Down

0 comments on commit 4790b29

Please sign in to comment.