Menu

Errors

How the API refuses a request: the error object, its codes, and what each status means.

Every refusal is a JSON object (or EDN, when asked for) with an error:

{"error": {"code": "insufficient-funds", "message": "…"}}

Software matches on code, never on message, which is for a person. Each operation lists the codes it answers under each status, with what to do; some codes carry more facts (a refused charge carries balance and estimate; invalid-params names the field).

  • upstream-unavailable, unavailable and ledger-unavailable mean a part of the platform did not answer: try again later.
  • internal is an unexpected failure: try again, then contact support.
  • A body under a content type other than JSON or EDN is refused 415 unsupported-media-type.

The weird command line turns refusals into exit codes.

The error object#

  • error, object, required — code and message always; the other properties only with the codes each names. A refused charge also carries the facts of the refusal (for insufficient-funds: balance, estimate).
    • max_content_bytes, value — with content-too-large
    • n, value — with car-invalid
    • message, string, required — the refusal in words, for a person; never matched on
    • accepted_dpa_version, string — with acknowledgement-outdated
    • grace_until, value — with account-unpaid
    • lang, string — with acknowledgement-outdated (one of ro, en)
    • min, integer — with invalid-params
    • charged, value — with not-enough-providers
    • hostname, string — with hostname-blocked
    • removing, value — with copy-change-in-progress
    • granted, array of strings — with insufficient-scope
    • readable, value — with copy-not-readable
    • managed_by, value — with managed-record
    • needs_support, value — with piece-ids-unknown
    • eligible_providers, value — with not-enough-providers
    • max, integer — with invalid-params
    • lost, value — with copy-change-in-progress
    • base, value — with free-names-not-ready
    • copy_jobs, value — with copy-change-in-progress
    • provider, string — with invalid-params
    • received_bytes, value — with content-too-large
    • expected, string — with invalid-params
    • name, value — with managed-record
    • limit, value — with domain-limit-reached, domain-pin-limit-reached
    • unpaid_since, value — with account-unpaid
    • copies, value — with copy-change-in-progress, not-enough-providers
    • placement_regions, value — with location-notice-outdated, location-notice-required, not-enough-providers
    • field, string — the failing parameter of an invalid-params refusal, when one is named
    • text, string — with acknowledgement-outdated
    • text_key, value — with location-notice-outdated, location-notice-required, location-notice-unavailable
    • domains, value — with content-in-use
    • until, string — with name-quarantined
    • copy_no, value — with copy-change-in-progress, copy-not-readable, piece-ids-unknown
    • kind, string — with acknowledgement-outdated
    • order, string — with invalid-params
    • excluded_by_region, value — with not-enough-providers
    • required, one of — with insufficient-scope, terms-acceptance-required
      • variant 1: string — insufficient-scope: the scope the route demands
      • variant 2: array of objects — terms-acceptance-required: the documents to accept
        • kind, string, required
        • version, string, required
    • state, value — with session-not-open
    • version, string — with acknowledgement-outdated, location-notice-outdated, location-notice-required, location-notice-unavailable
    • missing, value — with parts-missing
    • argument, string — with invalid-params
    • reason, string — with account-suspended, car-invalid, content-blocked, hostname-blocked, invalid-params
    • deployment_id, value — with managed-record
    • blockers, array of objects — with closing-blocked, second-factor-in-use
      • kind, string
      • count, integer
      • message, string
    • retry_after, integer — with account-too-new, claim-rate-limited (at least 1)
    • accepted_version, string — with acknowledgement-outdated, location-notice-outdated
    • served_elsewhere, value — with content-in-use
    • cid, string — with car-invalid, content-blocked
    • min_copies, value — with copies-at-minimum
    • size_bytes, value — with content-too-large, zip-too-large
    • rrtype, value — with managed-record
    • retry_at, string (date-time) — with account-too-new, claim-rate-limited
    • code, string, required — what went wrong, for software to match on (each route lists the codes it answers and what to do about them); upstream-unavailable, unavailable and ledger-unavailable mean a part of the platform did not answer: try again later; internal is an unexpected failure: try again, then contact support (one of access-denied, account-deleted, account-suspended, account-too-new, account-unpaid, acknowledgement-outdated, authorization-pending, base-closed, base-full, body-too-large, busy, capacity-exhausted, capacity-unavailable, car-invalid, charge-not-set, charges-not-published, claim-limit, claim-rate-limited, closing-blocked, cnp-required, company-identity-incomplete, conflict, content-blocked, content-in-use, content-too-large, contract-not-for-sale, copies-at-minimum, copy-change-in-progress, copy-not-readable, credits-not-on-sale, delegate-blocked, delete-in-progress, domain-limit-reached, domain-pin-limit-reached, domain-retired, dpa-not-published, email-taken, enrolment-required, free-names-not-ready, hostname-blocked, hostname-taken, insufficient-funds, insufficient-scope, internal, invalid-client, invalid-code, invalid-grant, invalid-params, invalid-state, invalid-token, invalid-totp, ip-mismatch, ledger-unavailable, location-notice-outdated, location-notice-required, location-notice-unavailable, malformed-body, managed-record, missing-charge, name-forbidden, name-quarantined, name-reserved, name-suspended, name-taken, not-available, not-enough-providers, not-found, not-implemented, nothing-to-refund, origin-refused, owner-insufficient-funds, owner-profile-incomplete, parts-missing, payment-disputed, payment-required, payments-disabled, piece-ids-unknown, precondition-failed, profile-incomplete, provider-unavailable, quota-exceeded, rate-limited, second-factor-in-use, send-failed, session-expired, session-not-open, session-required, slow-down, stats-detail-unavailable, stats-owner-only, step-up-required, storage-not-enabled, terms-acceptance-required, token-revoked, too-many-open-orders, totp-required, tunnel-limit, unauthorized, unavailable, unsupported-media-type, upstream-unavailable, verification-expired, withdrawal-period-over, zip-too-large)
    • contact, string — with account-suspended, content-blocked, hostname-blocked
    • dpa_version, string — with acknowledgement-outdated
    • credits, integer — with invalid-params
    • max_bytes, value — with zip-too-large
    • path_maps, value — with content-in-use

Every code#

CodeStatusOperations that list it
access-denied403adoptDomainRegistrantEmail, cancelDomainTransferOut, createDomainGrant, deployVpsApp, deviceComplete, devicePoll, requestDomainTransferOut, setDomainAutoRenew, setDomainNameservers, setDomainSensitive, tradeDomain, updateDomainRegistrant
account-suspended403111 operations
account-too-new403claimFreeName
account-unpaid402attachIpfsDomain, createIpfsName, createPin, createUpload, enableIpfsDomainStatsDetail, enableIpfsStorage
acknowledgement-outdated409enableIpfsDomainStatsDetail, registerDomain, renewDomain, startTopup, tradeDomain, transferDomain
authorization-pending400deviceComplete, devicePoll
base-closed409claimFreeName
base-full409attachIpfsDomain, claimFreeName
busy409attachVpsVolume, createVpsSnapshot, detachVpsVolume, openVpsConsole, powerOffVpsInstance, powerOnVpsInstance, rebootVpsInstance, rebuildVpsInstance, resetVpsInstance, resizeVpsInstance, resizeVpsVolume, shutdownVpsInstance
capacity-exhausted503createVpsInstance
capacity-unavailable503attachP2pAppDomain, createP2pApp, createTunnel, mintP2pMailboxCredentials, mintP2pTurnCredentials
car-invalid422completeUpload
charge-not-set503createP2pApp, createTunnel, createVpsInstance
charges-not-published50321 operations
claim-limit409claimFreeName
claim-rate-limited429claimFreeName
closing-blocked409requestAccountClosing
cnp-required403registerDomain, tradeDomain
company-identity-incomplete503createGift, publicCompany, publicCompanyField, startTopup
conflict40966 operations
content-blocked451attachIpfsDomain, completeUpload, createIpfsName, createPathMap, createPin, createUpload, retargetIpfsDomain, setIpfsNameTarget, setPathMapDesired, updateIpfsDomainPins
content-in-use409deleteIpfsContent
content-too-large413completeUpload, createUpload
copies-at-minimum409setIpfsContentCopies
copy-change-in-progress409setIpfsContentCopies
copy-not-readable409setIpfsContentCopies
credits-not-on-sale503createGift, startTopup
delegate-blocked403attachIpfsDomain, connectVpsInstanceHostname, setVpsInstanceRdns, upsertDnsRecords
delete-in-progress409deleteIpfsContent
domain-limit-reached409attachIpfsDomain, createIpfsName
domain-pin-limit-reached409attachIpfsDomain, updateIpfsDomainPins
domain-retired409enableIpfsDomainStatsDetail, updateIpfsDomainPins
dpa-not-published409enableIpfsDomainStatsDetail
email-taken409linkEmailConfirm, signupComplete, verifyEmailChange
enrolment-required40386 operations
free-names-not-ready503claimFreeName
hostname-blocked451attachIpfsDomain, attachP2pAppDomain, connectVpsInstanceHostname, createDnsZone, createIpfsName, createP2pApp, createPathMap, createTunnel, deployVpsApp, enableDomainHosting, updateTunnel
hostname-taken409createTunnel
insufficient-funds40230 operations
insufficient-scope403238 operations
invalid-client401oauthToken
invalid-code422contactVerifyConfirm, deviceApprove, deviceComplete, deviceDeny, deviceLookup, enrollVerify, linkEmailConfirm, loginVerify, phoneVerifyCheck, signupComplete, verifyEmailChange
invalid-grant400oauthToken
invalid-params400116 operations
invalid-state40922 operations
invalid-token401linkEmailConfirm, loginVerify, refresh, signupCancel, signupComplete, verifyEmailChange
invalid-totp42289 operations
ip-mismatch403contactVerifyConfirm
ledger-unavailable50325 operations
location-notice-outdated409enableIpfsStorage
location-notice-required409createUpload, enableIpfsStorage
location-notice-unavailable503enableIpfsStorage
managed-record409deleteDnsRecord, upsertDnsRecords
name-forbidden409claimFreeName
name-quarantined409claimFreeName
name-reserved409claimFreeName
name-suspended409attachIpfsDomain, releaseFreeName
name-taken409claimFreeName
not-available403linkEmailConfirm, signupComplete, startTopup, verifyEmailChange
not-enough-providers409, 503createUpload, enableIpfsStorage, setIpfsContentCopies
not-found404164 operations
not-implemented501getVpsInstanceMetrics, openVpsConsole, shutdownVpsInstance
nothing-to-refund409withdraw
origin-refused403loginVerify, logout, logoutAll, refresh, signupComplete
parts-missing409completeUpload
payment-disputed409withdraw
payment-required402powerOnVpsInstance
payments-disabled503createGift, startTopup
piece-ids-unknown409deleteIpfsContent
precondition-failed412updateBillingProfile, updateProfile
profile-incomplete403150 operations
provider-unavailable502createGift, getInvoicePdf, startTopup
quota-exceeded409createSshKey, createVpsInstance, createVpsSnapshot, createVpsVolume, deployVpsApp, generateSshKey
rate-limited429269 operations
second-factor-in-use409disableSecondFactor
send-failed502contactVerifyStart
session-expired401contactVerifyConfirm, deviceComplete, devicePoll, enrollVerify, linkEmailConfirm, loginVerify, signupCancel, signupComplete, verifyEmailChange
session-not-open409abortUpload, completeUpload
session-required403enrollStart
slow-down429devicePoll
stats-detail-unavailable409enableIpfsDomainStatsDetail
stats-owner-only403disableIpfsDomainStatsDetail, enableIpfsDomainStatsDetail
step-up-required40385 operations
storage-not-enabled409createUpload
terms-acceptance-required403237 operations
token-revoked401refresh
too-many-open-orders429startTopup
tunnel-limit409createTunnel
unauthorized401247 operations
unavailable409, 503189 operations
unsupported-media-type415importDnsZone
upstream-unavailable502170 operations
verification-expired401contactSubmit
withdrawal-period-over409withdraw
zip-too-large400createUpload