Uh oh!
There was an error while loading. Please reload this page.
fix(sveltekit): Avoid capturing 404 errors on client side - #9902
Merged
Conversation
Lms24
changed the base branch from
develop
to
lms/ref-sveltekit-improve-server-handleErrorDecember 18, 2023 18:07
Lms24
marked this pull request as ready for review
December 18, 2023 18:09
Closed
AbhiPrasad
approved these changes
Dec 18, 2023
| }); | ||
| return (input: SafeHandleServerErrorInput): ReturnType<HandleClientError> => { | ||
| const { status, message } = input; | ||
| const isNotFoundError = status === 404 && message === 'Not Found'; |
Contributor
There was a problem hiding this comment.
l: might make sense to extract this into function to use between client/server in case this logic needs to change in the future.
MemberAuthor
There was a problem hiding this comment.
Would have agreed but now that I simplified the check here and in #9901, I think it's no longer worth to extract checking for a 404 status.
Lms24force-pushed
the
lms/ref-sveltekit-improve-server-handleError
branch
from
December 19, 2023 12:18
a4e6a66 to
51788bcCompareLms24force-pushed
the
lms/fix-sveltekit-filter-client-not-found
branch
from
December 19, 2023 12:30
212846c to
b3e504aCompare
Base automatically changed from
lms/ref-sveltekit-improve-server-handleError to
developDecember 19, 2023 12:35
Lms24force-pushed
the
lms/fix-sveltekit-filter-client-not-found
branch
from
December 19, 2023 12:40
b3e504a to
8e8fc17CompareLms24
enabled auto-merge (squash)
December 19, 2023 12:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I belive, these errors weren't passed to the client side
handleErrorhook in Kit 1.x but in 2.x they're now passed into the hook. This means, we need to filter them out.Added the same logic for the client side as in #9901
ref #9851