Fetch has built-in timeout support
"The AbortSignal.timeout() static method returns an AbortSignal that will automatically abort after a specified time."
await fetch(url, {
signal: AbortSignal.timeout(5000),
});
"The AbortSignal.timeout() static method returns an AbortSignal that will automatically abort after a specified time."
await fetch(url, {
signal: AbortSignal.timeout(5000),
});