Enum ResponseVerificationError

Source
pub enum ResponseVerificationError {
Show 28 variants IoError(String), UnsupportedVerificationVersion { min_supported_version: u8, max_supported_version: u8, requested_version: u8, }, RequestedVerificationVersionMismatch { min_requested_verification_version: u8, requested_version: u8, }, CelError(CelParserError), Base64DecodingError(DecodeError), ParseIntError(ParseIntError), InvalidTreeRootHash, CertificateMissingCertifiedData { canister_id: String, }, UnexpectedExpressionPathPrefix { provided_expr_path: Vec<String>, }, UnexpectedExpressionPathSuffix { provided_expr_path: Vec<String>, }, ExactExpressionPathNotFoundInTree { provided_expr_path: Vec<String>, }, ExactExpressionPathMismatch { provided_expr_path: Vec<String>, request_path: String, }, ExactExpressionPathMightExistInTree { provided_expr_path: Vec<String>, potential_expr_path: Vec<String>, request_path: String, }, WildcardExpressionPathNotFoundInTree { provided_expr_path: Vec<String>, request_path: String, }, WildcardExpressionPathMismatch { provided_expr_path: Vec<String>, request_path: String, }, MoreSpecificWildcardExpressionMightExistInTree { provided_expr_path: Vec<String>, more_specific_expr_path: Vec<String>, request_path: String, }, InvalidExpressionHash { provided_expr_path: Vec<String>, }, InvalidRequestAndResponseHashes { provided_expr_path: Vec<String>, }, MissingLeafNode { provided_expr_path: Vec<String>, }, InvalidResponseBody, HeaderMissingCertificate, HeaderMissingTree, HeaderMissingCertificateExpressionPath, HeaderMissingCertificateExpression, HeaderMissingCertification, CborDecodingFailed(CborError), CertificateVerificationFailed(CertificateVerificationError), HttpCertificationError(HttpCertificationError),
}
Expand description

The primary container for response verification errors

Variants§

§

IoError(String)

Error converting UTF-8 string

§

UnsupportedVerificationVersion

An unsupported verification version was requested

Fields

§min_supported_version: u8

The minimum supported verification version

§max_supported_version: u8

The maximum supported verification version

§requested_version: u8

The actual requested verification version

§

RequestedVerificationVersionMismatch

Mismatch between the minimum requested version and the actual requested version

Fields

§min_requested_verification_version: u8

The minimum version that will be requested

§requested_version: u8

The actual requested version

§

CelError(CelParserError)

Error parsing CEL expression

§

Base64DecodingError(DecodeError)

Error decoding base64

§

ParseIntError(ParseIntError)

Error parsing int

§

InvalidTreeRootHash

The tree has different root hash from the expected value in the certified variables

§

CertificateMissingCertifiedData

The certificate provided by the “IC-Certificate” response header is missing the certified data witness for the canister

Fields

§canister_id: String

The ID of the canister that returned the response

§

UnexpectedExpressionPathPrefix

The expression path provided by the “IC-Certificate” response header has an unexpected suffix and should end with “<$>” or “<*>”

Fields

§provided_expr_path: Vec<String>

The invalid expression path

§

UnexpectedExpressionPathSuffix

The expression path provided by the “IC-Certificate” response header has an unexpected suffix and should end with “<$>” or “<*>”

Fields

§provided_expr_path: Vec<String>

The invalid expression path

§

ExactExpressionPathNotFoundInTree

The exact expression path provided by the “IC-Certificate” response header was not found in the tree

Fields

§provided_expr_path: Vec<String>

The missing expression path

§

ExactExpressionPathMismatch

The exact expression path provided by the “IC-Certificate” response header is not valid for the request path

Fields

§provided_expr_path: Vec<String>

The expression path provided by the “IC-Certificate” response header

§request_path: String

The request path

§

ExactExpressionPathMightExistInTree

A wildcard expression path was provided by the “IC-Certificate” response header but a potential exact expression path is valid for the request path and might exist in the tree

Fields

§provided_expr_path: Vec<String>

The expression path provided by the “IC-Certificate” response header

§potential_expr_path: Vec<String>

The expected expression path

§request_path: String

The request path

§

WildcardExpressionPathNotFoundInTree

The wildcard expression path provided by the “IC-Certificate” response was not found in the tree

Fields

§provided_expr_path: Vec<String>

The expression path provided by the “IC-Certificate” response header

§request_path: String

The request path

§

WildcardExpressionPathMismatch

The wildcard expression path provided by the “IC-Certificate” response header is not valid for the request path

Fields

§provided_expr_path: Vec<String>

The expression path provided by the “IC-Certificate” response header

§request_path: String

The request path

§

MoreSpecificWildcardExpressionMightExistInTree

A more specific wildcard expression path than the one provided by the “IC-Certificate” response header that is valid for the request path might exist in the tree

Fields

§provided_expr_path: Vec<String>

The expression path provided by the “IC-Certificate” response header

§more_specific_expr_path: Vec<String>

The more specific expression path that might exist in the tree

§request_path: String

The request path

§

InvalidExpressionHash

The hash of the CEL expression provided by the “IC-Certificate-Expression” response header does not exist at the expression path provided by the “IC-Certificate” response header

Fields

§provided_expr_path: Vec<String>

The expression path provided by the “IC-Certificate” response header

§

InvalidRequestAndResponseHashes

The hash of the request and response was not found in the tree at the expression path provided by the “IC-Certificate” response header

Fields

§provided_expr_path: Vec<String>

The expression path provided by the “IC-Certificate” response header

§

MissingLeafNode

The required empty leaf node was not found in the tree at the expression path provided by the “IC-Certificate” response header

Fields

§provided_expr_path: Vec<String>

The expression path provided by the “IC-Certificate” response header

§

InvalidResponseBody

The response body was a mismatch from the expected values in the tree

§

HeaderMissingCertificate

The certificate was missing from the certification header

§

HeaderMissingTree

The tree was missing from the certification header

§

HeaderMissingCertificateExpressionPath

The certificate expression path was missing from the certification header

§

HeaderMissingCertificateExpression

The certificate expression was missing from the response headers

§

HeaderMissingCertification

The certification values could not be found in the response headers

§

CborDecodingFailed(CborError)

Failed to decode CBOR

§

CertificateVerificationFailed(CertificateVerificationError)

Failed to verify certificate

§

HttpCertificationError(HttpCertificationError)

HTTP Certification error

Trait Implementations§

Source§

impl Clone for ResponseVerificationError

Source§

fn clone(&self) -> ResponseVerificationError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResponseVerificationError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ResponseVerificationError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ResponseVerificationError

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CborError> for ResponseVerificationError

Source§

fn from(source: CborError) -> Self

Converts to this type from the input type.
Source§

impl From<CelParserError> for ResponseVerificationError

Source§

fn from(source: CelParserError) -> Self

Converts to this type from the input type.
Source§

impl From<CertificateVerificationError> for ResponseVerificationError

Source§

fn from(source: CertificateVerificationError) -> Self

Converts to this type from the input type.
Source§

impl From<DecodeError> for ResponseVerificationError

Source§

fn from(source: DecodeError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ResponseVerificationError

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<HttpCertificationError> for ResponseVerificationError

Source§

fn from(source: HttpCertificationError) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIntError> for ResponseVerificationError

Source§

fn from(source: ParseIntError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.