use crate::HtsGetError;
use std::result;
use thiserror::Error;
pub type Result<T> = result::Result<T, Error>;
#[derive(Error, Debug)]
pub enum Error {
#[error("building auth middleware: {0}")]
AuthBuilderError(String),
}
impl From<jsonwebtoken::errors::Error> for HtsGetError {
fn from(err: jsonwebtoken::errors::Error) -> Self {
Self::InvalidAuthentication(format!("invalid JWT: {err}"))
}
}