lexich / lexich/redux-api

Add way to recognize error is abort from reset()

Open
#196 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
493
Forks
86
PR merge metrics
No merged PRs in 30d

Description

It would be quite handy to have a way to check if the error in the rest state is for a request aborted by rest.actions.endpointFoo.reset().

Right now the only thing I see is checking the error message == "Application abort request". I am getting flashes of my error overlay checking for errors like this: const showError = !!response.error Is there a better way or is this a valid issue?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing reset() and the error state in the repository, then inspect how aborted requests currently produce the "Application abort request" message. Done means callers can distinguish a reset abort without comparing the error message, preventing the error overlay from flashing for that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, redux
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.