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

Method handle_async

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

Source from the content-addressed store, hash-verified

242
243 @override
244 async def handle_async(self, request: APIRequest, call_next: AsyncCallNext) -> Any:
245 self.attempts.append(request.retries_taken)
246 try:
247 response = await call_next(request)
248 except Exception as err:
249 self.errors.append(err)
250 raise
251 self.statuses.append(response.status_code)
252 return response
253
254
255class Boom(Exception):

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected