Enum sn_node::Error[][src]

#[non_exhaustive]
pub enum Error {
Show variants NotAnAdult, NotAnElder, NoAdults(Prefix), NotEnoughSpace, NetworkFull, NoSourceMessageForProcessingError, UnexpectedProcessMsg, NoSectionFunds, NoSectionMetaData, NoImmutableChunks, NodeChurningFunds, ChurnSignError, NotInGenesis, NoDestinationName, NodeAlreadyActive, NoSectionPublicKey, UnknownSectionKey(PublicKey), CannotDirectMessage, CannotUpdateProcessErrorNode, ProvidedPkIsNotBlsShare, ProvidedPkIsNotBls, NoSectionPublicKeySet, NoSectionPublicKeyKnown(XorName), InvalidRewardStage, NodeNotFoundForReward, NoSuchChunk(DataAddress), NotChurningFunds, TempDirCreationFailed(String), NoStoreId, CouldNotCombineSignatures, DataExists, Io(Error), JsonSerialisation(Error), Bincode(Error), ClientMsg(Error), ProcessingError(ProcessingError), Message(Error), PickleDb(Error), NetworkData(Error), Transfer(Error), Routing(Error), TransferAlreadyRegistered, InvalidSignedTransfer(Dot<PublicKey>), InvalidPropagatedTransfer(CreditAgreementProof), InvalidMessage(MessageIdString), InvalidOwner(PublicKey), InvalidOperation(String), NoErrorMapping(String), Logic(String), Configuration(String), UnableToSend(MsgType),
}
Expand description

Node error variants.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotAnAdult

Attempted to perform an operation meant only for Adults when we are not one.

NotAnElder

Attempted to perform an operation meant only for Elders when we are not one.

NoAdults(Prefix)

No Adults in the section to perform Chunk operation

NotEnoughSpace

Not enough space in ChunkStore to perform put.

NetworkFull

Not enough storage available on the network.

NoSourceMessageForProcessingError

No source message provided for ProcessingError

UnexpectedProcessMsg

Unexpected Process msg. A ProcessingError was expected here…

NoSectionFunds

Node does not manage any section funds.

NoSectionMetaData

Node does not manage any metadata, so is likely not a fully prepared elder yet.

NoImmutableChunks

Node does not manage any immutable chunks.

NodeChurningFunds

Node is currently churning so cannot perform the request.

ChurnSignError

Node is currently churning, but failed to sign a message.

NotInGenesis

Genesis node not in genesis stage.

NoDestinationName

Target xorname could not be determined from DstLocation

NodeAlreadyActive

Failed to activate a node, due to it being active already

NoSectionPublicKey

Not Section PublicKey.

UnknownSectionKey(PublicKey)

Unknown as a Section PublicKey.

CannotDirectMessage

Nodes cannot send direct messages

CannotUpdateProcessErrorNode

Node cannot be updated, message cannot be resent

ProvidedPkIsNotBlsShare

Not a Section PublicKeyShare.

ProvidedPkIsNotBls

Not a Section PublicKey.

NoSectionPublicKeySet

Not Section PublicKeySet.

NoSectionPublicKeyKnown(XorName)

Not Section PublicKey.

InvalidRewardStage

Unable to parse reward proposal.

NodeNotFoundForReward

Node not found for rewarding

NoSuchChunk(DataAddress)

Key, Value pair not found in ChunkStore.

NotChurningFunds

Unable to process fund churn message.

TempDirCreationFailed(String)

Creating temp directory failed.

NoStoreId

Chunk Store Id could not be found

CouldNotCombineSignatures

Threshold crypto combine signatures error

DataExists

Chunk already exists for this node

Io(Error)

I/O error.

JsonSerialisation(Error)

JSON serialisation error.

Bincode(Error)

Bincode error.

ClientMsg(Error)

Network message error.

ProcessingError(ProcessingError)

Network processing error message.

Message(Error)

Network message error.

PickleDb(Error)

PickleDb error.

NetworkData(Error)

NetworkData error.

Transfer(Error)

sn_transfers error.

Routing(Error)

Routing error.

TransferAlreadyRegistered

Transfer has already been registered

InvalidSignedTransfer(Dot<PublicKey>)

Transfer message is invalid.

InvalidPropagatedTransfer(CreditAgreementProof)

Transfer message is invalid.

InvalidMessage(MessageIdString)

Message is invalid.

InvalidOwner(PublicKey)

Data owner provided is invalid.

InvalidOperation(String)

Operation is invalid, eg signing validation

NoErrorMapping(String)

No mapping to sn_messages::Error could be found. Either we need a new error there, or we need to handle or convert this error before sending it as a message

Logic(String)

Logic error.

Configuration(String)

Configuration error.

UnableToSend(MsgType)

Failed to send message to connection.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Converts a reference to Self into a dynamic trait object of Fail.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the “name” of the error. Read more

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

Provides context for this failure. Read more

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.