diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2024-09-21 18:09:50 -0500 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2024-09-21 18:09:50 -0500 |
commit | cbfca14b38806798847e3f2008038b25194a9b8b (patch) | |
tree | 1afcb3e3f34aba38e6d84e64e863024b4f1ead2a /src/error.rs |
chore: initial commit
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..ef30b97 --- /dev/null +++ b/src/error.rs @@ -0,0 +1,16 @@ +pub type Result<T, E = Error> = std::result::Result<T, E>; + +#[derive(Debug, thiserror::Error)] +pub enum Error { + #[error("IO error: {0}")] + IO(#[from] std::io::Error), + + #[error("Config error: {0}")] + Toml(#[from] toml::de::Error), + + #[error("Request error: {0}")] + Reqwest(#[from] reqwest::Error), + + #[error("Invalid HTTP method")] + Method, +} |