File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 42
42
" types/index.d.ts"
43
43
],
44
44
"scripts" : {
45
- "clean" : " rimraf ./dist ./test/generated ./test/e2e/generated ./samples/generated ./coverage ./node_modules/.cache" ,
45
+ "clean" : " npx rimraf ./dist ./test/generated ./test/e2e/generated ./samples/generated ./coverage ./node_modules/.cache" ,
46
46
"build" : " rollup --config --environment NODE_ENV:development" ,
47
47
"build:watch" : " rollup --config --environment NODE_ENV:development --watch" ,
48
48
"release" : " rollup --config --environment NODE_ENV:production" ,
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export const sendRequest = async <T>(
18
18
withCredentials: config.WITH_CREDENTIALS,
19
19
withXSRFToken: config.CREDENTIALS === 'include' ? config.WITH_CREDENTIALS : false,
20
20
cancelToken: source.token,
21
+ validateStatus: isSuccess,
21
22
};
22
23
23
24
onCancel(() => source.cancel('The user aborted a request.'));
Original file line number Diff line number Diff line change 1
1
export const isSuccess = (status: number): boolean => {
2
- return status >= 200 && status < 300;
2
+ return ( status >= 200 && status < 300) || status === 304 ;
3
3
};
You can’t perform that action at this time.
0 commit comments