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

Function handler

tests/test_exceptions.py:71–72  ·  view source on GitHub ↗
(_: httpx2.Request)

Source from the content-addressed store, hash-verified

69 client: Anthropic, duplicate: Callable[[APIStatusError], APIStatusError]
70) -> None:
71 def handler(_: httpx2.Request) -> httpx2.Response:
72 return httpx2.Response(400, headers={"x-foo": "bar"}, json={"error": "oops"})
73
74 http_client = httpx2.Client(transport=httpx2.MockTransport(handler))
75 failing_client = client.with_options(http_client=http_client, max_retries=0)

Callers 3

_validateMethod · 0.50
handleMethod · 0.50
handleMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected