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

improve error handling of fetchBaseQuery #1250

Merged
merged 4 commits into from Jul 9, 2021

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Jul 4, 2021

Fixes #1234

It will still cause an error, but a graceful one without information to be lost. This is probably the best way to tackle that.

Also I added handling for "fetch" failing, e.g. due to connection loss.

@phryneas phryneas requested a review from msutkowski July 4, 2021 18:38
@netlify
Copy link

netlify bot commented Jul 4, 2021

✔️ Deploy Preview for redux-starter-kit-docs ready!

🔨 Explore the source changes: 4fd483c

🔍 Inspect the deploy log: https://app.netlify.com/sites/redux-starter-kit-docs/deploys/60e20668f71dfa00083151f6

😎 Browse the preview: https://deploy-preview-1250--redux-starter-kit-docs.netlify.app

@github-actions
Copy link

github-actions bot commented Jul 4, 2021

size-limit report 📦

Path Size
1. entry point: @reduxjs/toolkit (cjs.production.min.js) 12.2 KB (0%)
1. entry point: @reduxjs/toolkit (esm.js) 10.23 KB (0%)
1. entry point: @reduxjs/toolkit/query (cjs.production.min.js) 20.31 KB (+0.76% 🔺)
1. entry point: @reduxjs/toolkit/query (esm.js) 17.36 KB (+0.95% 🔺)
1. entry point: @reduxjs/toolkit/query/react (cjs.production.min.js) 22.11 KB (+0.73% 🔺)
1. entry point: @reduxjs/toolkit/query/react (esm.js) 19.74 KB (+1.25% 🔺)
2. entry point: @reduxjs/toolkit (without dependencies) (cjs.production.min.js) 5.54 KB (0%)
2. entry point: @reduxjs/toolkit (without dependencies) (esm.js) 5.52 KB (0%)
2. entry point: @reduxjs/toolkit/query (without dependencies) (cjs.production.min.js) 9.2 KB (+1.66% 🔺)
2. entry point: @reduxjs/toolkit/query (without dependencies) (esm.js) 9.58 KB (+1.74% 🔺)
2. entry point: @reduxjs/toolkit/query/react (without dependencies) (cjs.production.min.js) 2.27 KB (0%)
2. entry point: @reduxjs/toolkit/query/react (without dependencies) (esm.js) 2.12 KB (0%)
3. createSlice (esm.js) 5.16 KB (0%)
3. createEntityAdapter (esm.js) 5.2 KB (0%)
3. configureStore (esm.js) 5.21 KB (0%)
3. createApi (esm.js) 15.64 KB (0%)
3. createApi (react) (esm.js) 17.96 KB (0%)
3. fetchBaseQuery (esm.js) 10.92 KB (+1.56% 🔺)
3. setupListeners (esm.js) 9.79 KB (0%)
3. ApiProvider (esm.js) 16.93 KB (0%)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 4, 2021

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 4e137a6:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration
funny-murdock-4slug Issue #1234

Copy link
Member

@msutkowski msutkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks great 💪 . We'll just need to update docs to reflect these changes, but that's not a blocker for getting this in.

@phryneas phryneas merged commit 4f9a7b8 into master Jul 9, 2021
@phryneas phryneas deleted the fetchBaseQuery-errorHandling branch July 9, 2021 11:05
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.

RTKQ: Error Handling on 404 Not Found Response
2 participants