Reputation: 367
I am developing a Angular app using ngRx and trying to exercise its best practices. But I came to place where I couldn't find how to proceed correctly, and that's dealing with HTTP (or Firebase) errors, and presenting them to the users.
I created actions for error handling in my app and I can, for example, show a modal when the user types a wrong password, but I don't if that is nice. I would be having to reuse error handling in all forms components...
Could I construct a "global" effect that gets all my actions with _FAILED (e.g) and opens a error Modal? Who should show the Modal, the effects or the component holding the form?
Would be very helpful if anyone could share its experience!
Upvotes: 4
Views: 2495