Continuing with error refactoring.
This commit is contained in:
@@ -8,7 +8,7 @@ pub use bearer::*;
|
||||
pub use header::*;
|
||||
pub use principal::*;
|
||||
|
||||
use crate::{error::AppError, repository::RepositoryError};
|
||||
use crate::{repository::RepositoryError, routes::extractors::ExtractorError};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Auth<T = Bearer>(pub Principal<T>);
|
||||
@@ -55,7 +55,7 @@ pub enum AuthError {
|
||||
|
||||
impl IntoResponse for AuthError {
|
||||
fn into_response(self) -> axum::response::Response {
|
||||
AppError::from(self).into_response()
|
||||
ExtractorError::from(self).into_response()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user