Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

[Refactor] Consolidate all similar error actions into a single error type #880

Open
rohithbalaji123 opened this issue Jun 24, 2020 · 1 comment

Comments

@rohithbalaji123
Copy link
Member

What is frustrating you?
The number of actions in reducers is increasing as and when a new feature is added. There are a lot of very similar actions like RAISE_CREATE_SHORT_LINK_ERROR, RAISE_GET_USER_SHORT_LINKS_ERROR, RAISE_GET_CHANGELOG_ERROR and if we follow the same pattern, there will be many more for each of CRUD operations of changelogs, users or shortlinks in admin panel which updates the same global states.

Your solution
We could consolidate based on the type of final action it performs instead of the cause which triggers that action(say RAISE_ERROR_MODAL).
The suggested pattern is already being followed for input validation errors for longLink and alias.

@magicoder10
Copy link
Member

This is a tech debt. We, as a team, will have to figure out a solution for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants