You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Soroban contract errors are u32 enum variants exposed as Error(Contract, #N) in transaction
results and diagnostic events. Every error code in this file is unique across all contracts
and is grouped first by contract, then by category.
When a transaction fails, inspect the result_xdr or run:
Caller is not permitted to perform this governance action.
Non-governor address calling queue, execute, or cancel.
Only the Governor contract address or an admin may call these functions.
402
NotProposer
Caller is not the original proposer of this proposal.
Attempting to cancel a proposal from an address that did not create it.
Only the proposer or a governance admin can cancel a proposal before it is queued.
governance — Validation
Code
Symbolic Name
Description
Common Causes
Remediation
411
InvalidProposalId
The proposal ID is zero or does not reference any known proposal.
Passing 0 or an ID that was never returned by propose.
Retrieve valid proposal IDs from emitted ProposalCreated events or via get_proposal.
412
InvalidVotingPeriod
The voting period is below the minimum or above the maximum allowed duration.
Specifying a period shorter than MIN_VOTING_PERIOD or longer than MAX_VOTING_PERIOD.
Use a voting period between MIN_VOTING_PERIOD (1 day) and MAX_VOTING_PERIOD (30 days).
413
InvalidCalldata
The proposal calldata is empty or exceeds the permitted size.
Submitting a proposal with no actions or with an action payload larger than 4 KB.
Ensure each calldata entry is non-empty and under 4,096 bytes.
414
QuorumNotMet
The proposal did not reach the required quorum of votes.
Too few eligible voters participated before the voting period ended.
Increase voter engagement or lower the quorum threshold via governance itself.
governance — State
Code
Symbolic Name
Description
Common Causes
Remediation
421
ProposalNotFound
No proposal exists with the given ID.
Querying a proposal ID that was never created or has been fully cleared from storage.
Only query proposal IDs that appear in ProposalCreated events.
422
ProposalNotActive
The proposal is not in an Active state and cannot accept votes.
Voting on a proposal that is Pending, Defeated, Queued, or Executed.
Check get_proposal_state(id) before calling cast_vote.
423
ProposalAlreadyExecuted
The proposal has already been executed and cannot be executed again.
Calling execute on a proposal that is already in the Executed state.
No action required; the proposal effects are already applied.
424
ProposalDefeated
The proposal was defeated (failed quorum or majority) and cannot proceed.
Attempting to queue or execute a defeated proposal.
A new proposal must be submitted.
425
AlreadyVoted
This address has already cast a vote on this proposal.
Calling cast_vote more than once from the same address for the same proposal.
Each address may vote once. Verify vote status with get_vote(proposal_id, address).
426
VotingClosed
The voting period for this proposal has ended.
Calling cast_vote after proposal.vote_end ledger timestamp.
Votes cannot be submitted after the voting period closes. Monitor vote_end via get_proposal.
governance — Timelock
Code
Symbolic Name
Description
Common Causes
Remediation
431
TimelockNotExpired
The timelock delay has not yet elapsed; the proposal cannot be executed.
Calling execute before execute_after timestamp is reached.
Wait for the timelock period to pass. Check get_execute_after(proposal_id) for the exact timestamp.
432
TimelockNotQueued
The proposal has not been queued in the timelock yet.
Calling execute on a proposal that passed voting but was never queued.
Call queue(proposal_id) first, then wait for the timelock, then call execute.
433
TimelockExpired
The execution window after the timelock has closed.
Calling execute after the GRACE_PERIOD following execute_after has elapsed.
The proposal must be re-queued (if permitted by governance) or a new proposal submitted.
434
NoPendingOperation
There is no pending timelock operation to cancel or execute.
Calling cancel or execute when no operation is queued for this proposal.
Verify the proposal is in Queued state via get_proposal_state before operating on the timelock.
Appendix: Error Code Index
Quick-reference table sorted by code number.
Code
Contract
Symbolic Name
101
medical_records
Unauthorized
102
medical_records
NotAdmin
103
medical_records
NotPatient
104
medical_records
NotProvider
105
medical_records
AccessRevoked
106
medical_records
AccessExpired
111
medical_records
InvalidPatientId
112
medical_records
InvalidRecordData
113
medical_records
InvalidTimestamp
114
medical_records
InvalidMetadata
115
medical_records
InvalidEncryptionKey
121
medical_records
RecordNotFound
122
medical_records
RecordAlreadyExists
123
medical_records
PatientNotRegistered
124
medical_records
ProviderNotRegistered
125
medical_records
ContractNotInitialized
126
medical_records
ContractAlreadyInitialized
131
medical_records
StorageLimitExceeded
132
medical_records
TtlExtensionFailed
201
access_control
Unauthorized
202
access_control
AdminOnly
203
access_control
CannotRevokeLastAdmin
211
access_control
InvalidRole
212
access_control
InvalidAddress
221
access_control
RoleAlreadyGranted
222
access_control
RoleNotFound
301
identity_registry
Unauthorized
302
identity_registry
RegistrarOnly
311
identity_registry
InvalidPublicKey
312
identity_registry
InvalidCredentialHash
313
identity_registry
InvalidAttestationData
321
identity_registry
IdentityNotFound
322
identity_registry
IdentityAlreadyRegistered
323
identity_registry
IdentityRevoked
324
identity_registry
CredentialAlreadyRevoked
401
governance
Unauthorized
402
governance
NotProposer
411
governance
InvalidProposalId
412
governance
InvalidVotingPeriod
413
governance
InvalidCalldata
414
governance
QuorumNotMet
421
governance
ProposalNotFound
422
governance
ProposalNotActive
423
governance
ProposalAlreadyExecuted
424
governance
ProposalDefeated
425
governance
AlreadyVoted
426
governance
VotingClosed
431
governance
TimelockNotExpired
432
governance
TimelockNotQueued
433
governance
TimelockExpired
434
governance
NoPendingOperation
Contributing: When adding a new error variant, assign the next available code in the
contract's range, add an entry to this file, and run scripts/validate_error_codes.sh locally
before opening a PR. The CI pipeline will reject PRs where the script reports undocumented errors.