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

Method give_up

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

Source from the content-addressed store, hash-verified

2041 attempts: list[int] = []
2042
2043 async def give_up(request: APIRequest, call_next: AsyncCallNext) -> Any: # noqa: ARG001
2044 attempts.append(request.retries_taken)
2045 raise RetryableError("try again")
2046
2047 client = make_async_client(middleware=[give_up], max_retries=2)
2048

Callers

nothing calls this directly

Calls 2

RetryableErrorClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected