Quiz 7 Question 5 of 20

An agent calls an external search tool to gather context before generating a code fix. The search tool has a 30-second timeout but occasionally takes longer than that under high load, causing the tool call to time out. When this happens, the agent raises an unhandled exception and terminates the entire task. What is the correct pattern to handle this scenario?

Select an answer to reveal the explanation.

Motivation