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

When a task throws an error, the flow manager hangs. #3

Closed
freakpol opened this issue Aug 27, 2019 · 2 comments
Closed

When a task throws an error, the flow manager hangs. #3

freakpol opened this issue Aug 27, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@freakpol
Copy link

Details on console

(node:5649) UnhandledPromiseRejectionWarning: #<Error>
(node:5649) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:5649) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@daniel-duarte daniel-duarte self-assigned this Aug 28, 2019
@daniel-duarte daniel-duarte added the bug Something isn't working label Aug 28, 2019
@daniel-duarte
Copy link
Collaborator

To be fixed in next release.

@daniel-duarte
Copy link
Collaborator

Fix available since released version 1.1.0.

Now you can catch any error thrown in a task resolver by using:

  • Simply the structure try {...} catch (error) {...} when using async/await.
  • flowPromise.catch(...) or flowPromise.then(onSuccess, onError) if no async/await is being used.

When a task throws an error, the flow does not continue the execution.
In future version, this behavior could be configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants