I see that in here:
https://github.com/championswimmer/vuex-module-decorators/blob/615cfd81cd486217adfcbf41d27532a026e35a84/src/mutationaction.ts#L21-L32
And here as well:
https://github.com/championswimmer/vuex-module-decorators/blob/8b9e458b7dc35872c18e50ef91907cab5f2dd839/src/action.ts#L21-L51
For the former code, the exception caught by the async action is unbeknownstly swallowed, and for the latter code, the exception was rewritten, was this all intended?
It isn't swallowed - it is pushed into console.error
My reasoning is that
So for the later I throw the exception, so the user is forced to correct it. For the former - it is not my business to prevent the user from performing the mutation that she herself has created. She gets the error log nevertheless
But I am open to changing this, if you have a different reasoning or different idea about how we can deal with this, I am all ears.
Thank you for taking time to use and/or evaluate this library
Yeah, I wished to control UI state during error in actions and I checked the error type by instanceof, so we should save the original error.
I have to say I really need this pr, I handle all kinds of error to render right UI.
Most helpful comment
https://github.com/championswimmer/vuex-module-decorators/pull/21