jp_holidays_lib/error.rs
1//! Defines crate-wide error types for use throughout the application.
2
3/// Error type for this crate.
4#[derive(Debug, thiserror::Error)]
5pub enum Error {
6 /// Occurs when sending HTTP requests fails.
7 #[error("HTTP リクエスト中にエラーが発生: {0}")]
8 Http(String),
9
10 /// Occurs when reading response body fails.
11 #[error("レスポンスボディの読み取りに失敗: {0}")]
12 BodyRead(String),
13
14 /// Occurs when parsing CSV fails.
15 #[error("CSV のパースに失敗: {0}")]
16 Parse(String),
17
18 /// Occurs when date format is invalid.
19 #[error("不正な日付: {0}")]
20 InvalidDate(String),
21}