esbenp / esbenp/redux-refresh-token

Error when using redux-api-middleware v3

Open
#4 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
37
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'm trying to implement this library, but since v3 of redux-api-middleware remove the CALL_API alias, I'm getting the following error:

> Unhandled promise rejection TypeError: Cannot read property 'endpoint' of undefined
> at **defaultIsRefreshCall**

checking the code, I found the line that is giving the error:

```
const defaultIsRefreshCall = (action, refreshAction) => {
return action["Call API"].endpoint === refreshAction["Call API"].endpoint;
};
```

I'm guessing because explicitly is expecting for CALL_API on the action, but since now the alias is RSAA nothing is found.

is there any plan to upgrade this library to work with redux-api-middleware v3 an RSAA alias? or is there a work around I can try?

thanks in advance for your help.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the reported defaultIsRefreshCall function and how actions are passed to it when using redux-api-middleware v3. Verify the RSAA action shape and the refresh path; done means the middleware no longer throws when CALL_API is absent and works with the v3 alias.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.