Skip to content
This repository was 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

@rohithbalaji123

Description

@rohithbalaji123

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions