fix: Add timeout to agents API fetch to prevent hanging
This commit is contained in:
@@ -21,6 +21,8 @@ export async function GET(req: NextRequest) {
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
cache: 'no-store',
|
cache: 'no-store',
|
||||||
|
// Add timeout to prevent hanging
|
||||||
|
signal: AbortSignal.timeout(10000), // 10 seconds
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user