Skip to content

Error codes

A canonical list of every error you can encounter when using Prova. The API returns errors as JSON with the shape:

json
{
  "error": "machine_readable_code",
  "message": "Human-readable explanation",
  "details": { /* optional, code-specific */ }
}

The CLI maps these to non-zero exit codes; the SDK throws a typed ProvaError carrying code, message, and details.


Authentication

CodeHTTPMeaning
auth_required401The endpoint requires a bearer token; none was supplied.
auth_invalid_token401The token is malformed or its signature does not match.
auth_token_expired401The token's exp claim has passed. Mint a new one.
auth_token_revoked401The token was explicitly revoked via POST /api/tokens/revoke.
auth_email_not_verified403Sign-up succeeded but the magic-link verify step is pending.
auth_quota_zero403The token is valid but has 0 MB quota; purchase quota first.

Quota and billing

CodeHTTPMeaning
quota_exceeded402Upload would push the account past its monthly quota.
payment_required402The deal cannot be created because the client has insufficient USDC allowance.
payment_signature_invalid400The provided EIP-712 signature does not match the marketplace order.

Upload / piece

CodeHTTPMeaning
piece_too_large413The piece exceeds the per-account upload limit. Split it client-side.
piece_too_small400Pieces below the minimum (currently 65 KiB) cannot be deal-anchored. Use the unanchored upload endpoint or pad the piece.
piece_cid_mismatch400The CommP you computed locally does not match what the server computed. The bytes were modified in transit; retry.
piece_already_exists200(Soft error.) An identical piece-CID already exists for this account. The response carries the existing deal info.

Retrieval

CodeHTTPMeaning
piece_not_found404No active deal matches this piece-CID.
piece_unavailable503The piece exists in the registry but no prover currently serves it. Retry or open a dispute.
piece_proof_pending202The piece was just uploaded; the first proof has not yet been submitted. Retry in 30s.

Deals and provers

CodeHTTPMeaning
deal_not_found404The deal id does not exist on this chain.
deal_already_active409A deal with the same piece-CID + client is already live.
prover_not_registered404The address is not in ProverRegistry.
prover_paused503The prover is temporarily not accepting new deals.
prover_insufficient_stake402The prover's bonded stake is below the per-TiB floor.

On-chain

CodeHTTPMeaning
chain_revert502The on-chain transaction reverted. details.reason carries the revert string.
chain_unsupported400The supplied chainId is not a Prova-supported chain (currently only Base).
chain_outage503The RPC endpoint is unreachable. The proof submission was queued for retry.

Disputes

CodeHTTPMeaning
dispute_window_closed410The dispute deadline has passed. Disputes must be opened within 24 hours of the bad proof.
dispute_bond_insufficient402The challenger did not post the required bond.
dispute_already_resolved409This dispute id has already been adjudicated.

Generic / transport

CodeHTTPMeaning
bad_request400The payload failed schema validation. details carries the failed field paths.
not_found404The resource does not exist or the caller is not entitled to see it.
rate_limited429The token exceeded its rate window. Honor the Retry-After header.
internal_error500An unexpected error happened server-side. Save the details.requestId and report it.
not_implemented501The endpoint exists but the underlying feature is not yet shipped.

CLI exit codes

The prova CLI maps API errors to POSIX-style exit codes so shell scripts can branch:

ExitCause
0Success
1Generic CLI error (bad args, parse error, missing file)
2auth_required / auth_invalid_token / auth_token_expired
3quota_exceeded / payment_required
4piece_* errors during upload
5piece_not_found / piece_unavailable during retrieval
6chain_* errors
7rate_limited
99internal_error (treat as bug; please report)

SDK error class

The SDK exposes a single ProvaError class with code, message, and an optional details payload. Subclasses are reserved for future use; right now instanceof ProvaError && err.code === '…' is the canonical pattern.

ts
import { ProvaError } from '@prova/sdk'

try {
  await prova.storage.upload(bytes)
} catch (err) {
  if (err instanceof ProvaError && err.code === 'quota_exceeded') {
    // top up the account, retry
  } else {
    throw err
  }
}

If you encounter an error code that's not in this table, file an issue at github.com/prova-network/docs.

Apache-2.0 OR MIT.