Skip to content

Commit ade9404

Browse files
akolotovclaude
andcommitted
docs: narrow Credit Exhaustion mapping to 402 with "Out of credits" body
Line 607 said "any 402 response" which contradicts the contract at line 232 (only HTTP 402 with body {"error":"Out of credits"} maps to CreditsExhaustedError). Align the description to match the authoritative contract. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c4aa4e9 commit ade9404

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

SPEC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ Credit-exhaustion responses on the PRO API *data path* are special-cased: the sh
604604

605605
**Credit Exhaustion (`402 Payment Required`)**
606606

607-
The shared `_make_blockscout_http_request` core maps any `402` response to a dedicated `CreditsExhaustedError`, which propagates immediately without retries. REST clients receive `402 Payment Required`; native MCP clients receive an `isError: true` tool result.
607+
The shared `_make_blockscout_http_request` core maps `HTTP 402` responses with body `{"error": "Out of credits"}` to a dedicated `CreditsExhaustedError`, which propagates immediately without retries. REST clients receive `402 Payment Required`; native MCP clients receive an `isError: true` tool result.
608608

609609
In composite tools (`get_address_info`, `get_block_info`, `get_transaction_info`), side requests absorb `CreditsExhaustedError` into a note (returning partial data) while the primary request hard-fails normally.
610610

0 commit comments

Comments
 (0)