-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: Dumber fix for error assertions #13894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Dumber fix for error assertions #13894
Conversation
|
There's some internal code as well that do not use these helpers and directly uses the |
fixes #13888
We've had issues in the past because
isHttpError
,isRedirect
, andisActionFailure
can start reporting false negatives when something somewhere decides to load two copies of the modules the classes are declared in. This switches to a tagged, structural approach that will survive these boundaries. The downside is that some library couldthrow { _tag: 'SvelteKitRedirect' }
andisRedirect
would reporttrue
, but... I mean, at that point, "hack the library at your own peril", I guess.This would let us revert our prior attempt at externalizing dependencies, which has caused additional bugs.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits