#[non_exhaustive]pub enum LinkedVpError {
InvalidService {
id: DidUrl,
reason: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
UnsupportedEndpoint(Url),
Http {
url: Url,
source: HttpError,
},
HttpStatus {
url: Url,
status: u16,
},
UnsupportedFormat(Url),
InvalidBody {
url: Url,
reason: &'static str,
source: Option<Box<dyn Error + Send + Sync>>,
},
HolderMismatch {
did: Did,
holder: Did,
},
Presentation(PresentationValidationError),
Validation(ValidationError),
Resolution(ResolutionError),
TooManyUrls(usize),
}linked-vp only.Expand description
Why a linked presentation could not be found, fetched or validated.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidService
A LinkedVerifiablePresentation service does not name one or more URLs. The source
is the URI or URL error, when there is one.
Fields
UnsupportedEndpoint(Url)
A URL is not https: an ipfs:// endpoint, say. Only HTTPS is fetched.
Http
The HttpClient got no response.
HttpStatus
The server answered with a status other than 2xx.
UnsupportedFormat(Url)
The body is a JSON object: a presentation in the JSON-LD form, which this crate does not process.
InvalidBody
The body is not a compact JWT. The source is the UTF-8 or JwsError.
Fields
HolderMismatch
The presentation’s holder is not the DID whose document links it.
Presentation(PresentationValidationError)
The presentation or some of its credentials did not validate.
Validation(ValidationError)
The presentation did not decode, or did not sign.
Resolution(ResolutionError)
The DID did not resolve.
TooManyUrls(usize)
The URL was not fetched: the DID document lists more URLs than the client’s limit, given here.
Trait Implementations§
Source§impl Debug for LinkedVpError
impl Debug for LinkedVpError
Source§impl Display for LinkedVpError
impl Display for LinkedVpError
Source§impl Error for LinkedVpError
impl Error for LinkedVpError
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()