Skip to content

Commit 4f792ed

Browse files
authored
fix(library): avoids rewrapping honorary non-actionable errors (#278)
- the built-in JS errors considered "non-actionable" hold enough context on their own - nesting them ends with in new `NonActionableError` instances just needlessly obfuscates the reason for failure
1 parent 943c3b4 commit 4f792ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library/Attempt/error/modifier/PotentiallyActionable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const assertPotentiallyActionable = <
1616

1717
if (
1818
givenError instanceof HonoraryNonActionableError
19-
) return NonActionableError.rethrow(givenError);
19+
) throw givenError; // eslint-disable-line no-restricted-syntax
2020

2121
return givenError as PotentiallyActionable<SomeError>;
2222
};

0 commit comments

Comments
 (0)