Enum offchain::types::ErrorCode[][src]

pub enum ErrorCode {
Show 21 variants InvalidHttpHeader, MissingHttpHeader, InvalidJws, InvalidJwsSignature, InvalidJson, InvalidObject, MissingField, UnknownField, UnknownCommandType, InvalidFieldValue, InvalidCommandProducer, InvalidInitialOrPriorNotFound, NoKycNeeded, InvalidRecipientSignature, UnknownAddress, Conflict, UnsupportedCurrency, InvalidOriginalPaymentReferenceId, InvalidOverwrite, InvalidTransition, Unknown,
}

Variants

InvalidHttpHeader

One of the following potential errors:

MissingHttpHeader

Missing HTTP header X-REQUEST-ID or X-REQUEST-SENDER-ADDRESS.

InvalidJws

Invalid JWS format (compact) or protected header

InvalidJwsSignature

JWS signature verification failed

InvalidJson

Request content is not valid Json

InvalidObject

Object is not valid, type does not match The Command request/response object json is not an object, or the command object type does not match command_type.

MissingField

Either:

UnknownField

A field is unknown for an object.

UnknownCommandType

Invalid/unsupported command_type.

InvalidFieldValue
InvalidCommandProducer

The HTTP request sender is not the right actor to send the payment object. For example, if the actor receiver sends a new command with payment object change that should be done by actor sender.

InvalidInitialOrPriorNotFound

could not find command by reference_id for a non-initial state command object; for example, actor receiver received a payment command object that actor sender status is ready_for_settlement, but receiver could not find any command object by the reference id.

NoKycNeeded

PaymentActionObject#amount is under travel rule threshold, no kyc needed for the transaction

InvalidRecipientSignature

Either:

UnknownAddress
Conflict
UnsupportedCurrency

Field payment.action.currency value is a valid Diem currency code, but it is not supported or acceptable by the receiver VASP.

InvalidOriginalPaymentReferenceId
InvalidOverwrite

Overwrite a write-once/immutable field value

InvalidTransition

As we only allow one actor action at a time, and the next states for a given command object state are limited to specific states. This error indicates the new payment object state is not valid according to the current object state. For example: VASP A sends RSOFT to VASP B, VASP B should send the next payment object with ABORT, or SSOFTSEND; VASP A should respond to this error code if VASP B sends payment object state SSOFT.

Unknown

Unknown Error Code

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

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

Generates a hash used only for tests.

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.