Skip to content

Conversation

@FaberVitale
Copy link
Contributor

@FaberVitale FaberVitale commented Nov 13, 2021

Notable changes

  • Handle async errors thrown by listeners
  • Changed signature of AsyncActionListener
  • onError now receives a second argument ListenerErrorInfo that provides additional information regarding the exception.

Context:

Build output

Build "actionListenerMiddleware" to dist/esm:
       1148 B: index.modern.js.gz
       1037 B: index.modern.js.br
Build "actionListenerMiddleware" to dist/module:
       1672 B: index.js.gz
       1509 B: index.js.br
Build "actionListenerMiddleware" to dist/cjs:
       1661 B: index.js.gz
       1493 B: index.js.br

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 13, 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 60aae66:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration
rsk-github-issues-example Configuration
@examples-query-react/basic Configuration
reduxjs/redux-toolkit Configuration

@FaberVitale FaberVitale force-pushed the action-listener-middleware/async-error-handling branch from e26b5d6 to 15ed8c3 Compare December 1, 2021 12:04
@FaberVitale FaberVitale changed the title refactor(action-listener-middleware): add async error handling action-listener-middleware: add async error handling Dec 1, 2021
@netlify
Copy link

netlify bot commented Dec 1, 2021

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

🔨 Explore the source changes: 60aae66

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

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

@markerikson markerikson merged commit 8ea3f75 into reduxjs:master Dec 2, 2021
@markerikson
Copy link
Collaborator

@FaberVitale I really appreciate your excellent PRs for the middleware!

I did just merge this PR, but I want to try using https://github.com/ethossoftworks/job-ts to wrap every listener invocation and give us an equivalent to saga parent/child tasks and cancelation. Given that, I think I'm probably going to need to drop the "sync/async" error handling distinction here, but I'm just starting to get a decent sense of how I want to make use of this and will be experimenting with it.

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