TypeError: Cannot read property 'cancelToken' of undefined
See original GitHub issueconst middlewareConfig = {
interceptors: {
request: [
{
success: function ({getState, dispatch, getSourceAction}, req) {
console.error(1, req);
},
error: function ({getState, dispatch, getSourceAction}, error) {
console.error(2, error);
}
}
],
response: [
{
success: function ({getState, dispatch, getSourceAction}, req) {
console.error(3, req);
},
error: function ({getState, dispatch, getSourceAction}, error) {
console.error(4, error);
}
}
]
}
};
const middleware = [
multiClientMiddleware(clients, middlewareConfig),
routerMiddleware(history)
];
export default createStore(
reducers,
composeEnhancers(
applyMiddleware(...middleware)
)
)
TypeError: Cannot read property 'cancelToken' of undefined
at throwIfCancellationRequested (index.js?v=:72)
at dispatchRequest (index.js?v=:84)
Issue Analytics
- State:
- Created 5 years ago
- Comments:11
Top Results From Across the Web
What is cancelToken by axios and how I fix it? - Stack Overflow
TypeError : Cannot read properties of undefined (reading 'cancelToken') at throwIfCancellationRequested (dispatchRequest.js:12:1) at ...
Read more >Cannot read property 'cancelToken' of undefined - Bitbucket
I need to authenticate first using Chrome and YubiKey/OTP and only then the API requests will be forwarded to Jira or BB. Now,...
Read more >TypeError: Cannot read property 'cancelToken' of undefined
const middlewareConfig = { interceptors: { request: [ { success: function ({getState, dispatch, getSourceAction}, req) { console.error(1, ...
Read more >Cannot read property 'cancelToken' of undefined“_滑德友的博客
Cannot read property 'cancelToken' of undefined“. axios拦截请求时忘记返回config了 // 拦截请求 httpService.interceptors.request.use(config ...
Read more >Axios Interceptor Model And Pitfalls - DEV Community
ts-node --files main.ts interceptor2 handle error caller handle error TypeError: Cannot read property 'cancelToken' of undefined.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Look the Comments
If you write
API.interceptors.request.use(config => { console.log(config) return config })not forgetreturn config