Skip to content

Commit

Permalink
fix(internal): return in castToError instead of throwing (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Feb 22, 2025
1 parent bdccc24 commit 50b5b64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/errors.ts
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ export const castToError = (err: any): Error => {
// @ts-ignore - not all envs have native support for cause yet
if (err.cause && !error.cause) error.cause = err.cause;
if (err.name) error.name = err.name;
throw error;
return error;
}
} catch {}
try {

0 comments on commit 50b5b64

Please sign in to comment.