diff --git a/packages/axios/src/index.ts b/packages/axios/src/index.ts index 64a75c32e..08846c24e 100644 --- a/packages/axios/src/index.ts +++ b/packages/axios/src/index.ts @@ -48,7 +48,9 @@ function createCommonRequest( instance.interceptors.response.use( async response => { - if (opts.isBackendSuccess(response)) { + const responseType: ResponseType = (response.config?.responseType as ResponseType) || 'json'; + + if (responseType !== 'json' || opts.isBackendSuccess(response)) { return Promise.resolve(response); }