redux-act-async icon indicating copy to clipboard operation
redux-act-async copied to clipboard

warning with node 7.x

Open FredericHeem opened this issue 8 years ago • 1 comments

(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]

FredericHeem avatar Mar 11 '17 18:03 FredericHeem

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());

mastilver avatar Mar 12 '17 14:03 mastilver