diff options
Diffstat (limited to 'lib/warden-core/src/error.rs')
| -rw-r--r-- | lib/warden-core/src/error.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/warden-core/src/error.rs b/lib/warden-core/src/error.rs new file mode 100644 index 0000000..f05971f --- /dev/null +++ b/lib/warden-core/src/error.rs @@ -0,0 +1,15 @@ +use thiserror::Error; + +#[derive(Error, Debug)] +pub enum WardenError { + #[error(transparent)] + Datastore(#[from] sqlx::Error), + #[error(transparent)] + Url(#[from] url::ParseError), + #[error("Missing required configuration values:\n`{0}`")] + Config(String), + #[error("invalid header (expected {expected:?}, found {found:?})")] + InvalidHeader { expected: String, found: String }, + #[error("unknown data store error")] + Unknown, +} |
