Skip to content

Commit 05a5275

Browse files
committed
refactor: remove unused redirect manual option
1 parent 964b179 commit 05a5275

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

apps/iframe-app/src/hooks/__tests__/useAgentCard.test.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('useAgentCard', () => {
5858
expect(result.current.data).toEqual(mockAgentCard);
5959
expect(mockFetch).toHaveBeenCalledWith(
6060
'https://api.example.com/.well-known/agent-card.json',
61-
expect.objectContaining({ credentials: 'include', redirect: 'manual' })
61+
expect.objectContaining({ credentials: 'include' })
6262
);
6363
});
6464

@@ -104,7 +104,6 @@ describe('useAgentCard', () => {
104104
headers: expect.objectContaining({
105105
'X-API-Key': 'test-api-key',
106106
}),
107-
redirect: 'manual',
108107
})
109108
);
110109
});
@@ -299,7 +298,6 @@ describe('useAgentCard', () => {
299298
expect.any(String),
300299
expect.objectContaining({
301300
credentials: 'include',
302-
redirect: 'manual',
303301
})
304302
);
305303
});

apps/iframe-app/src/hooks/useAgentCard.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@ async function fetchAgentCard(config: UseAgentCardConfig): Promise<AgentCard> {
3535
requestInit.credentials = 'include';
3636
}
3737

38-
requestInit.redirect = 'manual';
39-
4038
let response: Response;
4139
try {
4240
response = await fetch(url, requestInit);
43-
} catch {
41+
} catch (er) {
42+
console.log('charlie error:', er);
4443
// Network error or CORS failure (e.g., EasyAuth 302 redirect to login page)
4544
return handleUnauthorized(config);
4645
}

0 commit comments

Comments
 (0)