Skip to content

Commit 8ae5e43

Browse files
Stop axios from throwing error on non-2xx response
1 parent 917e02e commit 8ae5e43

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/components/src/httpSecurity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export async function secureAxiosRequest(config: AxiosRequestConfig, maxRedirect
9797
}
9898

9999
let redirects = 0
100-
let currentConfig = { ...config, maxRedirects: 0 } // Disable automatic redirects
100+
let currentConfig = { ...config, maxRedirects: 0, validateStatus: () => true } // Disable automatic redirects, accept all status codes
101101

102102
while (redirects <= maxRedirects) {
103103
const target = await resolveAndValidate(currentUrl)

0 commit comments

Comments
 (0)