pub enum SoftchatError {
Show 51 variants
InvalidSecretKey,
InvalidPublicKey,
InvalidEventId,
InvalidEventSignature,
InvalidEventKind,
InvalidEventTimestamp,
InvalidEventTag,
InvalidEventJson,
EventTooLarge,
EventSigningFailed,
Nip59EnvelopeCreationFailed,
InvalidNip59Envelope,
Nip17MessageCreationFailed,
InvalidNip17Message,
InvalidNip19Identifier,
ExternalSignerCapabilityUnavailable,
ExternalSignerCancelled,
ExternalSignerRejected,
InvalidExternalSignature,
InvalidRelayFrame,
InvalidRelayFilter,
InvalidRelayAuthentication,
InvalidRelayBatch,
InvalidAttachmentMetadata,
AttachmentTooLarge,
AttachmentEncryptionFailed,
AttachmentDecryptionFailed,
InvalidHttpAuthorization,
InvalidSoftchatEvent,
SoftchatEventCreationFailed,
InvalidSoftchatProjection,
InvalidUserMetadata,
InvalidContactList,
InvalidApplicationData,
InvalidRelaySession,
RelaySessionQueueFull,
InvalidDeliveryState,
InvalidPersistenceResult,
InvalidNoiseHandshake,
NoiseHandshakeConsumed,
NoiseSessionClosed,
NoiseTransportFailed,
InvalidNegentropy,
EmptyPlaintext,
PlaintextTooLarge,
UnsupportedAlgorithm,
CiphertextTooLarge,
EncryptionFailed,
DecryptionFailed,
IdentityErased,
InternalFailure,
}Expand description
Stable, redacted failures exposed by Softchat.
Variants§
InvalidSecretKey
The supplied secret key is not one valid 32-byte secp256k1 scalar.
InvalidPublicKey
The supplied public key is not one valid 32-byte x-only public key.
InvalidEventId
The supplied event ID is malformed or does not match the event body.
InvalidEventSignature
The supplied Schnorr signature is malformed or does not verify.
InvalidEventKind
The event kind is outside the NIP-01 16-bit range.
InvalidEventTimestamp
The event timestamp cannot be represented exactly on every target.
InvalidEventTag
A NIP-01 tag is not an array containing at least one string.
InvalidEventJson
The event is not valid NIP-01 JSON.
EventTooLarge
The encoded event exceeds the portable Softchat input bound.
EventSigningFailed
Signing failed after the event draft and identity were validated.
Nip59EnvelopeCreationFailed
A NIP-59 envelope could not be created from the supplied inputs.
InvalidNip59Envelope
A NIP-59 envelope failed route, structure, or authentication checks.
Nip17MessageCreationFailed
A one-to-one NIP-17 text rumor could not be created.
InvalidNip17Message
A rumor is not a valid one-to-one NIP-17 text message.
InvalidNip19Identifier
A NIP-19 display identifier is malformed, unsupported, or oversized.
An external signer does not provide the capability required by a request.
ExternalSignerCancelled
An external signer operation was cancelled by the user or host.
ExternalSignerRejected
An external signer provider rejected an otherwise valid request.
InvalidExternalSignature
An external signer returned a signature that did not authenticate.
InvalidRelayFrame
A relay frame is malformed, unsupported, oversized, or has invalid arity.
InvalidRelayFilter
A NIP-01 relay filter is malformed or exceeds the portable bounds.
InvalidRelayAuthentication
A NIP-42 authentication request is malformed or does not match its context.
InvalidRelayBatch
An EVENTS batch or its acknowledgement set violates the Softchat profile.
InvalidAttachmentMetadata
Inline Softchat attachment metadata is malformed or outside its bounds.
AttachmentTooLarge
Attachment bytes exceed the bounded in-memory compatibility operation.
AttachmentEncryptionFailed
Attachment encryption failed after validation.
AttachmentDecryptionFailed
Attachment authentication or decryption failed.
InvalidHttpAuthorization
A NIP-98 request plan has an invalid method, URL, payload, or redirect.
InvalidSoftchatEvent
A typed Softchat chat event is malformed or violates its profile.
SoftchatEventCreationFailed
A canonical Softchat event could not be created from the supplied values.
InvalidSoftchatProjection
A pure event-history projection contains unauthorized or malformed input.
InvalidUserMetadata
A private metadata rumor or its retained JSON is invalid.
InvalidContactList
A private NIP-02 contact backup is malformed or ambiguous.
InvalidApplicationData
NIP-78 or Softchat app-data content is malformed or unauthorized.
InvalidRelaySession
A relay-session transition is invalid for its current state.
RelaySessionQueueFull
A bounded relay-session queue cannot accept more work.
InvalidDeliveryState
A delivery transition or retry result is contradictory.
InvalidPersistenceResult
A platform persistence result does not match its requested transaction.
InvalidNoiseHandshake
A Noise NK handshake key or message is malformed or unauthenticated.
NoiseHandshakeConsumed
A single-use Noise handshake capability was already consumed.
NoiseSessionClosed
An established Noise session was explicitly closed.
NoiseTransportFailed
Noise transport rejected a frame without exposing cryptographic detail.
InvalidNegentropy
A Negentropy set, frame, limit, or state transition is invalid.
EmptyPlaintext
NIP-44 does not permit an empty plaintext.
PlaintextTooLarge
The UTF-8 plaintext exceeds the NIP-44 v2 limit.
UnsupportedAlgorithm
The message declares an algorithm this library does not understand.
CiphertextTooLarge
The encoded ciphertext exceeds Softchat’s cheap pre-decode bound.
EncryptionFailed
Encryption failed after the inputs were validated.
DecryptionFailed
Authentication, decoding, padding, version, or UTF-8 validation failed.
IdentityErased
The local identity’s secret material was explicitly erased.
InternalFailure
An unexpected implementation failure was redacted at the public boundary.
Implementations§
Trait Implementations§
Source§impl Clone for SoftchatError
impl Clone for SoftchatError
Source§fn clone(&self) -> SoftchatError
fn clone(&self) -> SoftchatError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for SoftchatError
impl<UT> ConvertError<UT> for SoftchatError
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for SoftchatError
impl Debug for SoftchatError
Source§impl Display for SoftchatError
impl Display for SoftchatError
Source§impl Error for SoftchatError
impl Error for SoftchatError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<UT> FfiConverter<UT> for SoftchatError
impl<UT> FfiConverter<UT> for SoftchatError
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl From<ExternalSignerFailure> for SoftchatError
impl From<ExternalSignerFailure> for SoftchatError
Source§fn from(failure: ExternalSignerFailure) -> Self
fn from(failure: ExternalSignerFailure) -> Self
Source§impl<UT> Lift<UT> for SoftchatError
impl<UT> Lift<UT> for SoftchatError
Source§impl<UT> LiftRef<UT> for SoftchatError
impl<UT> LiftRef<UT> for SoftchatError
type LiftType = SoftchatError
Source§impl<UT> LiftReturn<UT> for SoftchatError
impl<UT> LiftReturn<UT> for SoftchatError
Source§type ReturnType = <SoftchatError as Lift<UT>>::FfiType
type ReturnType = <SoftchatError as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for SoftchatError
impl<UT> Lower<UT> for SoftchatError
Source§impl<UT> LowerError<UT> for SoftchatError
impl<UT> LowerError<UT> for SoftchatError
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for SoftchatError
impl<UT> LowerReturn<UT> for SoftchatError
Source§type ReturnType = <SoftchatError as Lower<UT>>::FfiType
type ReturnType = <SoftchatError as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl PartialEq for SoftchatError
impl PartialEq for SoftchatError
Source§fn eq(&self, other: &SoftchatError) -> bool
fn eq(&self, other: &SoftchatError) -> bool
self and other values to be equal, and is used by ==.Source§impl<UT> TypeId<UT> for SoftchatError
impl<UT> TypeId<UT> for SoftchatError
const TYPE_ID_META: MetadataBuffer
impl Copy for SoftchatError
impl Eq for SoftchatError
impl StructuralPartialEq for SoftchatError
Auto Trait Implementations§
impl Freeze for SoftchatError
impl RefUnwindSafe for SoftchatError
impl Send for SoftchatError
impl Sync for SoftchatError
impl Unpin for SoftchatError
impl UnsafeUnpin for SoftchatError
impl UnwindSafe for SoftchatError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more