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

Method give_up

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

Source from the content-addressed store, hash-verified

851 attempts: list[int] = []
852
853 def give_up(request: APIRequest, call_next: CallNext) -> Any: # noqa: ARG001
854 attempts.append(request.retries_taken)
855 raise RetryableError("try again")
856
857 client = make_sync_client(middleware=[give_up], max_retries=2)
858

Callers

nothing calls this directly

Calls 2

RetryableErrorClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected