Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 523b244

Browse files
Fix fetch
1 parent 04a9d5c commit 523b244

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/hooks/useGetTestConnectionLogs.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ReactNode, useCallback, useEffect, useRef, useState } from 'react';
33
import useTheme from '@mui/material/styles/useTheme';
44

55
import { SyncLogLevel } from '../types';
6+
import { cloudQueryApiBaseUrl } from '../utils';
67
import customFetch from '../utils/customFetch';
78
import { parseSyncLogsByLevel } from '../utils/logs';
89

@@ -70,7 +71,11 @@ export function useGetTestConnectionLogs(
7071

7172
if (response.headers.get('content-type') === 'application/json') {
7273
const data = (await response.json()) as { location: string };
73-
const logDataResponse = await fetch(data.location);
74+
const logDataResponse = await fetch(
75+
data.location.startsWith('http')
76+
? data.location
77+
: `${cloudQueryApiBaseUrl}${data.location}`,
78+
);
7479
if (!logDataResponse.ok) {
7580
throw new Error(logDataResponse.statusText);
7681
}

0 commit comments

Comments
 (0)