redux-toolkit icon indicating copy to clipboard operation
redux-toolkit copied to clipboard

rethrow errors from dispatching async thunk actions

Open EskiMojo14 opened this issue 1 year ago • 4 comments

currently, if any reducers throw an error when responding to the pending action (for example, if you had a typo) the error would get swallowed into a rejected action

this change instead resurfaces that error, as suggested by Lenz a while ago

TODO: see if this same approach can be applied to #3795

EskiMojo14 avatar May 02 '24 16:05 EskiMojo14

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

codesandbox[bot] avatar May 02 '24 16:05 codesandbox[bot]

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

Name Link
Latest commit e268789f3dcf65404593a0f3927d354a0ad5b018
Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/6633c187f06cbd00087cb5e7
Deploy Preview https://deploy-preview-4387--redux-starter-kit-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar May 02 '24 16:05 netlify[bot]

size-limit report 📦

Path Size
1. entry point: @reduxjs/toolkit/query/react (modern.mjs) 13.53 KB (+0.19% 🔺)
1. entry point: @reduxjs/toolkit (cjs, production.min.cjs) 14.13 KB (+0.21% 🔺)
1. entry point: @reduxjs/toolkit/react (cjs, production.min.cjs) 14.25 KB (+0.24% 🔺)
1. entry point: @reduxjs/toolkit/query (cjs, production.min.cjs) 22.01 KB (+0.12% 🔺)
1. entry point: @reduxjs/toolkit/query/react (cjs, production.min.cjs) 23.99 KB (+0.19% 🔺)
2. entry point: @reduxjs/toolkit (without dependencies) (cjs, production.min.cjs) 7.52 KB (+0.28% 🔺)
3. createAsyncThunk (.modern.mjs) 4.95 KB (+0.5% 🔺)
3. buildCreateSlice and asyncThunkCreator (.modern.mjs) 6.16 KB (+0.39% 🔺)
3. createApi (.modern.mjs) 13.87 KB (+0.14% 🔺)
3. createApi (react) (.modern.mjs) 15.51 KB (+0.17% 🔺)

github-actions[bot] avatar May 02 '24 16:05 github-actions[bot]

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 e268789f3dcf65404593a0f3927d354a0ad5b018:

Sandbox Source
rsk-github-issues-example Configuration
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

codesandbox-ci[bot] avatar May 02 '24 16:05 codesandbox-ci[bot]