Skip to content

Commit

Permalink
fix: actually use custom error object (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
ottokruse authored Jan 2, 2025
1 parent 1fab445 commit 3213777
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/node-web-compat-web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ export const nodeWebCompat: NodeWebCompat = {
}
const response = await fetch(uri, { ...requestOptions, body: data }).catch(
(err) => {
new FetchError(uri, err.message);
throw err;
throw new FetchError(uri, err.message);
}
);
if (response.status !== 200) {
Expand Down

0 comments on commit 3213777

Please sign in to comment.