#[repr(i32)]pub enum ErrorCode {
ERROR_CODE_UNSPECIFIED = 0,
ERROR_CODE_BAD_REQUEST = 1,
ERROR_CODE_UNAUTHENTICATED = 2,
ERROR_CODE_PERMISSION_DENIED = 3,
ERROR_CODE_NOT_FOUND = 4,
ERROR_CODE_MISSING_ACCOUNT_ID = 5,
ERROR_CODE_INVALID_ACCOUNT_ID = 6,
ERROR_CODE_MISSING_WALLET = 7,
ERROR_CODE_WALLET_RESOLUTION_UNAVAILABLE = 8,
ERROR_CODE_WALLET_NOT_FOUND = 9,
ERROR_CODE_UPSTREAM_ERROR = 10,
}Expand description
ErrorCode enumerates stable machine-readable error codes for the Ledger Read API. These mirror the REST problem+json “code” field for parity between REST and ConnectRPC clients.
Variants§
ERROR_CODE_UNSPECIFIED = 0
ERROR_CODE_BAD_REQUEST = 1
ERROR_CODE_UNAUTHENTICATED = 2
ERROR_CODE_PERMISSION_DENIED = 3
ERROR_CODE_NOT_FOUND = 4
ERROR_CODE_MISSING_ACCOUNT_ID = 5
Missing or invalid account identifier (legacy; used by older endpoints).
ERROR_CODE_INVALID_ACCOUNT_ID = 6
ERROR_CODE_MISSING_WALLET = 7
Wallet-specific errors for balance lookups by wallet.
ERROR_CODE_WALLET_RESOLUTION_UNAVAILABLE = 8
ERROR_CODE_WALLET_NOT_FOUND = 9
ERROR_CODE_UPSTREAM_ERROR = 10
Upstream dependency error (e.g., transfers store, wallet resolver).
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const Unspecified: Self = Self::ERROR_CODE_UNSPECIFIED
pub const Unspecified: Self = Self::ERROR_CODE_UNSPECIFIED
Idiomatic alias for Self::ERROR_CODE_UNSPECIFIED; Debug prints the variant name.
Sourcepub const BadRequest: Self = Self::ERROR_CODE_BAD_REQUEST
pub const BadRequest: Self = Self::ERROR_CODE_BAD_REQUEST
Idiomatic alias for Self::ERROR_CODE_BAD_REQUEST; Debug prints the variant name.
Sourcepub const Unauthenticated: Self = Self::ERROR_CODE_UNAUTHENTICATED
pub const Unauthenticated: Self = Self::ERROR_CODE_UNAUTHENTICATED
Idiomatic alias for Self::ERROR_CODE_UNAUTHENTICATED; Debug prints the variant name.
Sourcepub const PermissionDenied: Self = Self::ERROR_CODE_PERMISSION_DENIED
pub const PermissionDenied: Self = Self::ERROR_CODE_PERMISSION_DENIED
Idiomatic alias for Self::ERROR_CODE_PERMISSION_DENIED; Debug prints the variant name.
Sourcepub const NotFound: Self = Self::ERROR_CODE_NOT_FOUND
pub const NotFound: Self = Self::ERROR_CODE_NOT_FOUND
Idiomatic alias for Self::ERROR_CODE_NOT_FOUND; Debug prints the variant name.
Sourcepub const MissingAccountId: Self = Self::ERROR_CODE_MISSING_ACCOUNT_ID
pub const MissingAccountId: Self = Self::ERROR_CODE_MISSING_ACCOUNT_ID
Idiomatic alias for Self::ERROR_CODE_MISSING_ACCOUNT_ID; Debug prints the variant name.
Sourcepub const InvalidAccountId: Self = Self::ERROR_CODE_INVALID_ACCOUNT_ID
pub const InvalidAccountId: Self = Self::ERROR_CODE_INVALID_ACCOUNT_ID
Idiomatic alias for Self::ERROR_CODE_INVALID_ACCOUNT_ID; Debug prints the variant name.
Sourcepub const MissingWallet: Self = Self::ERROR_CODE_MISSING_WALLET
pub const MissingWallet: Self = Self::ERROR_CODE_MISSING_WALLET
Idiomatic alias for Self::ERROR_CODE_MISSING_WALLET; Debug prints the variant name.
Idiomatic alias for Self::ERROR_CODE_WALLET_RESOLUTION_UNAVAILABLE; Debug prints the variant name.
Sourcepub const WalletNotFound: Self = Self::ERROR_CODE_WALLET_NOT_FOUND
pub const WalletNotFound: Self = Self::ERROR_CODE_WALLET_NOT_FOUND
Idiomatic alias for Self::ERROR_CODE_WALLET_NOT_FOUND; Debug prints the variant name.
Sourcepub const UpstreamError: Self = Self::ERROR_CODE_UPSTREAM_ERROR
pub const UpstreamError: Self = Self::ERROR_CODE_UPSTREAM_ERROR
Idiomatic alias for Self::ERROR_CODE_UPSTREAM_ERROR; Debug prints the variant name.
Trait Implementations§
impl Copy for ErrorCode
Source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Source§impl Enumeration for ErrorCode
impl Enumeration for ErrorCode
Source§fn proto_name(&self) -> &'static str
fn proto_name(&self) -> &'static str
.proto file.impl Eq for ErrorCode
Source§impl ProtoElemJson for ErrorCode
impl ProtoElemJson for ErrorCode
Source§fn serialize_proto_json<S: Serializer>(
v: &Self,
s: S,
) -> Result<S::Ok, S::Error>
fn serialize_proto_json<S: Serializer>( v: &Self, s: S, ) -> Result<S::Ok, S::Error>
Source§fn deserialize_proto_json<'de, D: Deserializer<'de>>(
d: D,
) -> Result<Self, D::Error>
fn deserialize_proto_json<'de, D: Deserializer<'de>>( d: D, ) -> Result<Self, D::Error>
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.