wasmflow_entity/error.rs
1use thiserror::Error;
2
3#[derive(Error, Debug, Clone)]
4
5/// The error type for Wasmflow Entities.
6pub enum ParseError {
7 /// Encountered an invalid scheme when parsing an entity URL.
8 #[error("Invalid scheme {0}")]
9 Scheme(String),
10 /// No authority/host supplied in the entity URL.
11 #[error("Missing authority/host")]
12 Authority,
13 /// Invalid authority/host supplied in the entity URL.
14 #[error("Invalid authority/host '{0}', missing separator '.'")]
15 InvalidAuthority(String),
16 /// Invalid authority/host kind.
17 #[error("Invalid authority/host kind '{0}'")]
18 InvalidAuthorityKind(String),
19 /// Error parsing an entity URL.
20 #[error("{0}")]
21 Parse(url::ParseError),
22}