Skip to content
This repository was archived by the owner on Oct 17, 2020. It is now read-only.
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

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.

Activity

  1. naturetime10 commented on Jun 25, 2020

    @naturetime10
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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