← Back to Demo Hub
Test #8API & Data Fetching

API Timeout

Request hangs indefinitely with no timeout configured.

📋 Demo Instructions

  1. Click the "Trigger Error" button below
  2. Open browser console (F12) to see the error
  3. Wait 5-10 seconds for the error to be captured
  4. Go to Dashboard → Performance Monitoring
  5. Click "Fix with Carla" on the error
  6. Review the generated PR
🌍 Real-World Scenario
Slow backend endpoint or network issues cause the request to hang. User sees a loading spinner forever with no feedback about what's happening.
✅ Expected Fix
Add AbortController with a reasonable timeout (e.g., 10 seconds). Show timeout error message to user and offer retry option.
Fix Confidence:MEDIUM

💻 Buggy Code

// Buggy Code
const response = await fetch('/api/slow-endpoint');
// No timeout - can hang for minutes

🔴 Error Log

Waiting for error to be triggered...