pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error(transparent)]
GraphitepdfErrors(#[from] graphitepdf_errors::GraphitePdfError),
#[error(transparent)]
Io(#[from] std::io::Error),
#[error(transparent)]
Http(#[from] reqwest::Error),
#[error(transparent)]
Base64(#[from] base64::DecodeError),
#[error(transparent)]
Utf8(#[from] std::str::Utf8Error),
#[error(transparent)]
Svg(#[from] graphitepdf_svg::Error),
#[error("invalid image data: {message}")]
InvalidImageData { message: String },
#[error("unsupported image format: {format}")]
UnsupportedImageFormat { format: String },
}