MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / error_of

Function error_of

tests/lib/tools/test_agent_toolset.py:1012–1015  ·  view source on GitHub ↗
(tool: Any, **input: object)

Source from the content-addressed store, hash-verified

1010
1011
1012async def error_of(tool: Any, **input: object) -> str:
1013 with pytest.raises(ToolError) as exc_info:
1014 await tool.call(input)
1015 return cast(str, exc_info.value.content)
1016
1017
1018async def result_of(tool: Any, **input: object) -> tuple[str, bool]:

Calls 1

callMethod · 0.45

Tested by

no test coverage detected