---
type: email
from: programing-with-murtaza <notifications@github.com>
subject: Re: [openai/openai-agents-python] docs: Add a comprehensive example for handling function tool errors. (PR #1354)
received: 2026-03-05 10:05:14
date_header: Thu, 14 Aug 2025 01:01:16 -0700
priority: normal
status: awaiting_approval
uid: 27550
---

## Email Content

**From:** programing-with-murtaza <notifications@github.com>
**Subject:** Re: [openai/openai-agents-python] docs: Add a comprehensive example for handling function tool errors. (PR #1354)
**Date:** Thu, 14 Aug 2025 01:01:16 -0700

### Body (preview)

@MurtazaAliCode commented on this pull request.







> @@ -320,3 +320,26 @@ When you create a function tool via `@function_tool`, you can pass a `failure_er

 -   If you explicitly pass `None`, then any tool call errors will be re-raised for you to handle. This could be a `ModelBehaviorError` if the model produced invalid JSON, or a `UserError` if your code crashed, etc.

 

 If you are manually creating a `FunctionTool` object, then you must handle errors inside the `on_invoke_tool` function.

+

+## Example: Custom Error Handling in Function Tools



fix it 



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/pull/1354#discussion_r2275803860

You are receiving this because you are subscribed to this thread.



Message ID: <openai/openai-agents-python/pull/1354/review/3119449009@github.com>

---

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Escalate
