fix(infra-monitoring): use proper axios instance for retrying the 401 req (#6841)

This commit is contained in:
Vikrant Gupta 2025-01-17 10:33:09 +05:30 committed by GitHub
parent 8e11a988be
commit e9618d64bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
import { ApiBaseInstance } from 'api'; import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler'; import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios'; import { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api'; import { ErrorResponse, SuccessResponse } from 'types/api';
@ -59,7 +59,7 @@ export const getHostLists = async (
headers?: Record<string, string>, headers?: Record<string, string>,
): Promise<SuccessResponse<HostListResponse> | ErrorResponse> => { ): Promise<SuccessResponse<HostListResponse> | ErrorResponse> => {
try { try {
const response = await ApiBaseInstance.post('/hosts/list', props, { const response = await axios.post('/hosts/list', props, {
signal, signal,
headers, headers,
}); });