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

Method handle_async

tests/test_middleware.py:218–226  ·  view source on GitHub ↗
(self, request: APIRequest, call_next: AsyncCallNext)

Source from the content-addressed store, hash-verified

216
217 @override
218 async def handle_async(self, request: APIRequest, call_next: AsyncCallNext) -> Any:
219 self.attempts.append(request.retries_taken)
220 try:
221 response = await call_next(request)
222 except Exception as err:
223 self.errors.append(err)
224 raise
225 self.statuses.append(response.status_code)
226 return response
227
228
229class Boom(Exception):

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected