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

Method handle

tests/test_middleware.py:144–148  ·  view source on GitHub ↗
(self, request: APIRequest, call_next: CallNext)

Source from the content-addressed store, hash-verified

142
143 @override
144 def handle(self, request: APIRequest, call_next: CallNext) -> Any:
145 response = call_next(request)
146 if response.status_code == 529:
147 return call_next(self._fallback(request))
148 return response
149
150 @override
151 async def handle_async(self, request: APIRequest, call_next: AsyncCallNext) -> Any:

Callers

nothing calls this directly

Calls 1

_fallbackMethod · 0.95

Tested by

no test coverage detected