FairScale

Error Codes

HTTP status codes and error payloads across FairScale APIs.

All APIs return JSON errors on non-2xx responses. Shape varies slightly by host but follows the same patterns.

Common response shape

{
  "error": "missing_wallet",
  "message": "wallet query parameter is required"
}

Agent and credit APIs may also include code instead of or alongside error.

By status

StatusMeaningTypical cause
400Bad requestMissing or invalid parameters
401UnauthorizedMissing or invalid fairkey
402Payment requiredNo fairkey on a paid endpoint
404Not foundUnknown route or wallet profile
429Rate limitedPlan quota or burst limit exceeded
502Upstream errorScoring engine temporarily unavailable

400 codes (agent-api.fairscale.xyz)

CodeEndpointFix
missing_walletMostPass wallet query param
invalid_walletMostUse valid base58 Solana address (32-44 chars)
invalid_preset/v1/score/aiUse a documented preset name
weights_must_sum_to_1/v1/score/aiCustom weights must sum to 1.0 (+/- 0.02)
missing_weightsPOST /v1/score/aiInclude weights body for custom scoring
too_many_wallets/v1/score/batchMax 25 wallets per batch request

400 codes (api.fairscale.xyz)

CodeEndpointFix
missing_wallet/score, shortcutsPass wallet query param
invalid_wallet/score, shortcutsValid Solana address

429 codes

CodeMeaning
daily_limit_exceededPartner key daily quota reached
rate_limit_exceededBurst rate limit hit

Retry with exponential backoff. See Rate Limiting for plan tiers.

SDK handling

try {
  const score = await client.score("WALLET");
} catch (err: any) {
  console.error(err.status, err.code ?? err.message);
}

Host reference

HostAuth headerDocs
api.fairscale.xyzfairkeyScore
agent-api.fairscale.xyzfairkey or X-Api-KeyAgent Score, Credit