forked from Haroldwonder/TrustLink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.rs
More file actions
58 lines (56 loc) · 2.14 KB
/
Copy patherrors.rs
File metadata and controls
58 lines (56 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Error definitions for TrustLink.
//!
//! All contract error codes are defined here and re-exported from the crate root.
use soroban_sdk::contracterror;
#[contracterror]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum Error {
AlreadyInitialized = 1,
NotInitialized = 2,
/// Caller lacks required permissions. Includes rejection when `issuer` equals `subject` in `create_attestation`.
Unauthorized = 3,
NotFound = 4,
DuplicateAttestation = 5,
AlreadyRevoked = 6,
Expired = 7,
InvalidValidFrom = 8,
InvalidExpiration = 9,
MetadataTooLong = 10,
/// Source reference string is missing or empty.
InvalidSourceReference = 44,
InvalidTimestamp = 11,
InvalidFee = 12,
FeeTokenRequired = 13,
TooManyTags = 14,
TagTooLong = 15,
/// Threshold must be >= 1 and <= number of required signers.
InvalidThreshold = 16,
/// The signer is not in the proposal's required_signers list.
NotRequiredSigner = 17,
/// The signer has already co-signed this proposal.
AlreadySigned = 18,
/// The proposal has already been finalized.
ProposalFinalized = 19,
/// The proposal has expired without reaching threshold.
ProposalExpired = 20,
/// The revocation reason exceeds the maximum allowed length of 128 characters.
ReasonTooLong = 21,
/// Endorser cannot endorse their own attestation.
CannotEndorseOwn = 22,
/// Endorser has already endorsed this attestation.
AlreadyEndorsed = 23,
/// The contract is paused; write operations are temporarily disabled.
ContractPaused = 24,
/// Subject is not on the issuer's whitelist and the issuer has whitelist mode enabled.
SubjectNotWhitelisted = 25,
/// Claim type string is empty, too long, or contains disallowed characters.
InvalidClaimType = 26,
/// Jurisdiction code is not a valid ISO 3166-1 alpha-2 code.
InvalidJurisdiction = 27,
/// Issuer has exceeded the minimum issuance interval (rate limit).
RateLimited = 28,
/// Storage limit exceeded for issuer or subject.
LimitExceeded = 29,
/// The proposal has been cancelled by the proposer.
ProposalCancelled = 30,
}