Skip to content

Commit 2f70ad9

Browse files
fix(internal): return in castToError instead of throwing (#43)
1 parent a68f100 commit 2f70ad9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/internal/errors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const castToError = (err: any): Error => {
2222
// @ts-ignore - not all envs have native support for cause yet
2323
if (err.cause && !error.cause) error.cause = err.cause;
2424
if (err.name) error.name = err.name;
25-
throw error;
25+
return error;
2626
}
2727
} catch {}
2828
try {

0 commit comments

Comments
 (0)