From 61b6008db55f8aa6d9cc8d8998c3e28916e144cc Mon Sep 17 00:00:00 2001 From: Naz Date: Thu, 31 Jul 2025 14:50:21 +0100 Subject: =?UTF-8?q?=E2=9C=A8feat:=20add=20an=20error=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/error.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/error.rs (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..0183e38 --- /dev/null +++ b/src/error.rs @@ -0,0 +1,21 @@ +use derive_more::From; + +pub type Result = core::result::Result; + +#[derive(Debug, From)] +pub enum Error { + InvalidPath, + NotFound(String), + + #[from] + Io(std::io::Error), + + #[from] + Json(serde_json::Error), + + #[from] + Http(reqwest::Error), + + #[from] + EnvVar(std::env::VarError), +} -- cgit v1.2.3