Skip to content

Error Codes Reference ​

This document indexes all error codes across the REST API and the Soroban SettlementRegistry smart contract.

Soroban Contract Error Discriminants ​

The SettlementRegistry contract defines stable numeric error codes returned on transaction failure:

CodeError NameDescription
1AlreadyInitializedContract constructor has already been executed.
2NotFoundRequested settlement case or attestation was not found.
3CaseAlreadyExistsCase with the given 32-byte identifier already exists.
4ObserverAlreadyRegisteredObserver address is already registered in the whitelist.
5ObserverNotRegisteredCaller is not an authorized registered observer.
6UnauthorizedCaller lacks required authorization for the requested operation.
7InvalidStateTarget case is not in a valid lifecycle state for the operation.
8InvalidExpirationExpiration sequence must be strictly greater than current ledger.
9InvalidCommitmentCommitment payload is malformed or all zeros.
10CounterpartyRequiredOperation requires a counterparty address, but none was defined.
11CounterpartyNotAllowedCounterparty cannot be the same address as the case owner.
12AttestationAlreadyExistsAttestation already submitted by this address for the case.
13ResolutionAlreadySubmittedResolution commitment already submitted by this party.
14ResolutionMismatchBilateral resolution commitments between parties do not match.
15MissingRequiredAttestationRequired participant attestation is missing.
16InvalidDecisionDecision tag is invalid for the current case state.
17InvalidLedgerObservation ledger is zero or in the future relative to current ledger.
18InvalidObserverQuorumObserver quorum threshold must be a positive integer.
19ObserverQuorumNotMetRequired observer quorum threshold was not met.
20DisputeNotExpiredDispute has not yet expired; current ledger sequence is before expiration ledger.
21DisputeAlreadyExpiredDispute has already expired; resolution submissions are no longer accepted.

REST API Error Envelopes ​

API errors are returned in a standardized, sanitized JSON envelope:

json
{
  "error": {
    "code": "INVALID_STATE_TRANSITION",
    "message": "Cannot finalize case in OPEN state",
    "requestId": "550e8400-e29b-41d4-a716-446655440000"
  }
}
HTTP StatusError CodeDescription
400VALIDATION_ERRORRequest payload failed Zod schema validation or amount was non-numeric.
400INVALID_STATE_TRANSITIONOperation attempted an invalid lifecycle state progression.
401UNAUTHORIZEDRequest missing valid authorization credentials.
403FORBIDDENSigner is not authorized to submit attestations or execute action for case.
404NOT_FOUNDCase ID, attestation, or proof record does not exist.
409CONFLICTResource conflict or duplicate case identifier.
409QUORUM_NOT_METCannot finalize case because required distinct observer quorum has not been met.
409IDEMPOTENCY_CONFLICTReused idempotency key with conflicting payload.
500INTERNAL_ERRORInternal server or storage exception (sanitized in production).
503NOT_READYReadiness probe failed due to database or Soroban RPC unavailability.

Released under the Apache-2.0 License.