Skip to main content

openapi_ui/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum UIError {
5    #[error("Failed to parse OpenAPI specification: {0}")]
6    ParseError(String),
7
8    #[error("IO error: {0}")]
9    IoError(#[from] std::io::Error),
10
11    #[error("JSON serialization error: {0}")]
12    JsonError(#[from] serde_json::Error),
13
14    #[error("Invalid configuration: {0}")]
15    ConfigError(String),
16}
17
18pub type Result<T> = std::result::Result<T, UIError>;