recurse fix

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-05-07 23:18:49 -07:00
parent 2f8832989a
commit 9f3d49ab93

View file

@ -325,8 +325,6 @@ export default function PodcastsPageClient({ searchSpaceId }: PodcastsPageClient
} }
); );
clearTimeout(timeoutId);
if (!response.ok) { if (!response.ok) {
throw new Error(`Failed to fetch audio stream: ${response.statusText}`); throw new Error(`Failed to fetch audio stream: ${response.statusText}`);
} }
@ -345,6 +343,8 @@ export default function PodcastsPageClient({ searchSpaceId }: PodcastsPageClient
throw new Error('Request timed out. Please try again.'); throw new Error('Request timed out. Please try again.');
} }
throw error; throw error;
} finally {
clearTimeout(timeoutId);
} }
} catch (error) { } catch (error) {
console.error('Error fetching or playing podcast:', error); console.error('Error fetching or playing podcast:', error);