easy-peasy icon indicating copy to clipboard operation
easy-peasy copied to clipboard

Does a Thunk really need an explicit call to fail

Open kuhmuh opened this issue 5 years ago • 2 comments

Hello,

I enjoy Easy Peasy very much and just want to migrate to v4 and have some failing tests. I stumbled on this comment and want clarification about this, because it is not yet documented. In v3 a failed thunk (to be exact: at least a thunk that returns a rejected Promise) triggers a listener with a failType. In v4 it does not. The comment suggests to call fail helper method if a thunk fails. Is this really necessary for every "failed/rejected" thunk? Thanks for clarification.

Best regards Stefan

kuhmuh avatar Nov 18 '20 08:11 kuhmuh

Yeah I think at least adding more documentation about how error handling works in thunks would be great

LuisOsta avatar Nov 18 '20 20:11 LuisOsta

i have the same question. I hesitate upgrading to v4 because i fear that it now silently swallows errors in thunks.

I don't use actionOn and thunkOn (tbh. i dont understand the use case for that), am i still affected by this change?

macrozone avatar Dec 24 '20 09:12 macrozone