MCPcopy
hub / github.com/openai/openai-agents-python / _get_failure_error_function

Method _get_failure_error_function

src/agents/mcp/server.py:524–530  ·  view source on GitHub ↗

Return the effective error handler for MCP tool failures.

(
        self, agent_failure_error_function: ToolErrorFunction | None
    )

Source from the content-addressed store, hash-verified

522 return bool(policy)
523
524 def _get_failure_error_function(
525 self, agent_failure_error_function: ToolErrorFunction | None
526 ) -> ToolErrorFunction | None:
527 """Return the effective error handler for MCP tool failures."""
528 if self._failure_error_function is _UNSET:
529 return agent_failure_error_function
530 return cast(ToolErrorFunction | None, self._failure_error_function)
531
532
533class _MCPServerWithClientSession(MCPServer, abc.ABC):

Callers 1

to_function_toolMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected