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

Method give_up

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

Source from the content-addressed store, hash-verified

1781 attempts: list[int] = []
1782
1783 async def give_up(request: APIRequest, call_next: AsyncCallNext) -> Any: # noqa: ARG001
1784 attempts.append(request.retries_taken)
1785 raise RetryableError("try again")
1786
1787 client = make_async_client(middleware=[give_up], max_retries=2)
1788

Callers

nothing calls this directly

Calls 2

RetryableErrorClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected