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

Method handler

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

Source from the content-addressed store, hash-verified

3476 self, async_client: AsyncAnthropic, error: Exception, message: str
3477 ) -> None:
3478 def handler(request: httpx2.Request) -> httpx2.Response:
3479 if request.url.host == "example.com":
3480 return httpx2.Response(307, headers={"Location": "https://other.example.com/foo"})
3481 raise error
3482
3483 with pytest.raises(APIConnectionError) as exc_info:
3484 await async_client.with_options(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected