Command Palette

Search for a command to run...

Hectal
Phase 0: Start Here: AI Features Through a Frontend Developer's Eyes
AI Frontend · Exercise 4 of 5 PreviousNext
Beginner

Keep the Partial Answer

This route sends two pieces of the answer and then the connection drops. The current code loses everything and fails with an uncaught error.

Fix it: keep the text that arrived in #answer, and show The answer was cut off. Please try again. in #error.

What Check tests

  1. After the connection drops, #answer still shows the text that arrived
  2. #error says the answer was cut off
  3. No uncaught error reaches the console

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.