use std::io;
use std::path::PathBuf;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum InputSpecError {
#[error("The specified file does not exist: '{str}'")]
FileDoesntExist { str: String },
#[error("The specified path is a directory, not a file: {str}")]
PathIsDir { str: String },
#[error("The input data is invalid or cannot be processed: {error}")]
InvalidInput { error: String },
#[error("Cannot get absolute path for '{path}': {error}")]
AbsolutePathError { path: String, error: io::Error },
#[error("Cannot convert file path to URL: {path:?}")]
FromFilePath { path: PathBuf },
#[error("Error opening path {path:?} for reading ({msg}): {err}")]
OpenPathError { msg: String, path: PathBuf, err: io::Error },
#[error("Invalid Accept header value '{str}' in context '{context}': {error}")]
AcceptValue {
context: String,
str: String,
error: String,
},
#[error("Invalid User-Agent header value: {error}")]
UserAgentValue { error: String },
#[error("Failed to build HTTP client: {error}")]
ClientBuilderError { error: String },
#[error("Error dereferencing URL {url}: {error}")]
UrlDerefError { url: url::Url, error: String },
#[error("Cannot guess base IRI from path: {path:?}")]
GuessBaseFromPath { path: PathBuf },
#[error("Error parsing path from string '{str}': {error}")]
ParsingPathError { str: String, error: String },
#[error("Error parsing URL from string '{str}': {error}")]
UrlParseError { str: String, error: String },
#[error("Operation '{operation}' is not supported in WASM environment")]
WasmNotSupported { operation: String },
}