Skip to content
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: log error in getKey #2102 #2103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

onlyanegg
Copy link

Logs caught errors in getKey within useSWRInfinite

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 3, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6c3c016:

Sandbox Source
SWR-Basic Configuration
SWR-States Configuration
SWR-Infinite Configuration
SWR-SSR Configuration

@koba04
Copy link
Collaborator

koba04 commented Nov 10, 2022

Throwing an error in the key function is a valid pattern in SWR, as described in https://beta-swr.vercel.app/docs/conditional-fetching. So I'd say logging errors would be annoying.

@onlyanegg
Copy link
Author

Yeah, I'm aware of that pattern. My point is that we're silently catching these errors, which makes it hard to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants