In tool use, what is the most appropriate way to handle a function call that returns an error (e.g., API failure)?

Answer

Inspect the error, inform the user if needed, and ask for confirmation or fallback

Explanation

Good practice is to check the failure reason, communicate appropriately, and use fallback behavior rather than guessing.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list