ERROR MODEL
Machine-readable failures.
REST errors use { "error": { "code": "…", "message": "…" } }. Branch on error.code; the human-readable message may become clearer without a version change. MCP transport authentication failures use the OAuth-style { "error": "invalid_token", "error_description": "…" } envelope. Billing suspension is different: a valid credential returns HTTP 402 with JSON-RPC error data code billing_payment_required and no reauthentication challenge. Other authenticated tool failures use result.isError; completed CompanyProof operations place the REST envelope in result.content[0].text, while SDK input-validation failures may return plain diagnostic text instead.
400invalid_json · invalid_request · invalid_company · invalid_company_id · invalid_claim · answer_too_long · too_many_claims · duplicate_claim_field · invalid_idempotency_key
401authentication_required · invalid_api_key
402billing_payment_required — the credential is valid, but live API and MCP access is suspended until billing is restored
403live_key_required · plan_upgrade_required · monitoring_requires_live_access · monitoring_requires_live_key · test_key_sample_only
409idempotency_conflict — the key was already used with a materially different request
413body_too_large — search exceeds 32 KiB, another REST JSON request exceeds 64 KiB, or an MCP message exceeds 128 KiB
415unsupported_media_type — Content-Type is not application/json
422no_supported_claims — no supported deterministic claim could be extracted
429rate_limit_exceeded · monthly_quota_exceeded · evaluation_quota_exceeded
502dependency_timeout · company_search_failed · profile_retrieval_failed · intelligence_query_failed · verification_failed
503service_unavailable · billing_period_unavailable — a required CompanyProof service or authoritative billing period is temporarily unavailable
404company_not_found — entity resolution returned no company or no profile exists for the supplied CompanyProof company ID
