-
-
Couldn't load subscription status.
- Fork 3.5k
fix(react-query): update skipToken error message condition #7502
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(react-query): update skipToken error message condition #7502
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 90196fb. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
|
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 90196fb:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7502 +/- ##
===========================================
+ Coverage 41.42% 85.34% +43.91%
===========================================
Files 184 23 -161
Lines 7331 307 -7024
Branches 1531 78 -1453
===========================================
- Hits 3037 262 -2775
+ Misses 3889 37 -3852
+ Partials 405 8 -397
|
|
all places in query that want to report user config errors use query/packages/react-query/src/useBaseQuery.ts Lines 39 to 45 in e5f23fc
This is on purpose to also see these errors in test environments. For example, you might have your test runner configured to fail on console errors, so these messages are helpful there. |
In my opinion, to express development mode console error message, we should use
process.env.NODE_ENV === 'development'to express development mode. because @tanstack/react-query-devtools also useprocess.env.NODE_ENV === 'development'and additionally, even for production app, process.env.NODE_ENV !== 'production' can be occurred. so I want to minimize opportunity to make this error message like @tanstack/react-query-devtoolshttps://github.com/TanStack/query/blob/main/packages/react-query-devtools/src/index.ts#L6