I use it on every action and it's tedious to add it to all of them.
Or just don't wrap the Error when the module is dynamic, since the message is about doing stuff outside of a dynamic module
It's also bad for static modules -- any error in the module, no matter how trivial, gets hidden and replaced by the irrelevant message.
You can see the original error about halfway down the stack trace. It鈥檚 annoying though, and always confuses new devs coming onto the project I鈥檓 using it. A console.warn would be a better approach imo.
I am considering making rawError true as default
I would prefer making rawError: true as default as well.
At the very least it would be nice to maybe have a global/module config for it that could then be over-ridden if necessary. something like:
@Module({rawError: true})
which could apply to the whole module.
But again my preference would be for the default to be true.
I'm happy to have a stab at putting in a PR if you have a preference @championswimmer
+1 for rawError true by default or on the @Module
I'm experiencing some issues related to this in my unit tests when I expect actions to reject based on mocked axios errors. If I har rawError set to false it fails the test.
Would be really nice if we could somehow tie rawError to NODE_ENV so that we can easily set it to false in prod and let it be true in test/dev etc.
Most helpful comment
I am considering making rawError true as default