shindan_maker/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

/// Errors that can occur during Shindan operations.
#[derive(Error, Debug)]
pub enum ShindanError {
    #[error("HTTP request failed: {0}")]
    Request(#[from] reqwest::Error),

    #[error("HTML parsing failed: {0}")]
    Parse(String),

    #[error("Required form token not found: {0}")]
    TokenNotFound(&'static str),

    #[error("Session cookie not found")]
    SessionCookieNotFound,
}