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

Method handler

tests/test_client.py:1675–1678  ·  view source on GitHub ↗
(request: httpx2.Request)

Source from the content-addressed store, hash-verified

1673 self, client: Anthropic, error: Exception, message: str
1674 ) -> None:
1675 def handler(request: httpx2.Request) -> httpx2.Response:
1676 if request.url.host == "example.com":
1677 return httpx2.Response(307, headers={"Location": "https://other.example.com/foo"})
1678 raise error
1679
1680 with pytest.raises(APIConnectionError) as exc_info:
1681 client.with_options(

Callers 2

handle_requestMethod · 0.45
handle_async_requestMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected