pub enum SdkError {
Show 29 variants
InvalidAgentId(String),
InvalidAgentIdPrefix,
InvalidPublicKeyLength(usize),
CanonicalJson(String),
Json(Error),
Base64(DecodeError),
Ed25519(SignatureError),
Random(String),
InvalidSignatureLength(usize),
InvalidEventHash {
expected: String,
actual: String,
},
InvalidEventHashLength(usize),
InvalidEventProtocol {
expected: String,
actual: String,
},
InvalidEventType {
expected: String,
actual: String,
},
InvalidActor(String),
TimestampOutOfWindow,
InvalidNonce(String),
NonceNotGreater {
max_nonce: u64,
},
MissingRoomId,
RoomIdMismatch {
expected: String,
actual: String,
},
PermissionDenied,
InvalidPayload(String),
TypeNotDefined(String),
TypeDisabled(String),
PayloadSchemaViolation(String),
PackUnavailable(String),
InvalidJwt(String),
InvalidJwtClaim(&'static str),
Protocol {
code: &'static str,
message: String,
},
HttpStatus {
status: u16,
code: Option<String>,
data: Option<Value>,
max_seen_nonce: Option<String>,
body: String,
},
}Variants§
InvalidAgentId(String)
InvalidAgentIdPrefix
InvalidPublicKeyLength(usize)
CanonicalJson(String)
Json(Error)
Base64(DecodeError)
Ed25519(SignatureError)
Random(String)
InvalidSignatureLength(usize)
InvalidEventHash
InvalidEventHashLength(usize)
InvalidEventProtocol
InvalidEventType
InvalidActor(String)
TimestampOutOfWindow
InvalidNonce(String)
NonceNotGreater
MissingRoomId
RoomIdMismatch
PermissionDenied
InvalidPayload(String)
TypeNotDefined(String)
TypeDisabled(String)
PayloadSchemaViolation(String)
InvalidJwt(String)
InvalidJwtClaim(&'static str)
Protocol
A protocol error identified by its Agent Protocols error code.
HttpStatus
A non-2xx response. code and data come from the Agent Identity
error body when the service sent one; max_seen_nonce from the
Max-Seen-Nonce header.
Implementations§
Trait Implementations§
Source§impl Error for SdkError
impl Error for SdkError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<DecodeError> for SdkError
impl From<DecodeError> for SdkError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SdkError
impl !UnwindSafe for SdkError
impl Freeze for SdkError
impl Send for SdkError
impl Sync for SdkError
impl Unpin for SdkError
impl UnsafeUnpin for SdkError
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
Mutably borrows from an owned value. Read more