redux-act-async
redux-act-async copied to clipboard
warning with node 7.x
(node:80559) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): AssertionError: expected undefined to equal 'ciccio'
(node:80559) 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.
(node:80559) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): [object Object]
I think it's because noRethrow is set to false and you are not handling the error
With:
const testAction = createActionAsync('test', () => Promise.reject(new Error('an error')));
This is fine:
dispatch(testAction()).catch(err => console.error(err));
While this is not and will display error messages (And kill the process on node@8):
dispatch(testAction());