mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-13 00:58:59 +08:00
fix(infra-monitoring): use proper axios instance for retrying the 401 req (#6841)
This commit is contained in:
parent
8e11a988be
commit
e9618d64bc
@ -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,
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user