Skip to content

Commit

Permalink
refactor: moved feature specific imports under cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhranshuSanjeev committed Nov 8, 2024
1 parent a1202a5 commit d1b62e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/superposition_types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ impl FromRequest for User {
if let Some(user) = req.extensions().get::<Self>() {
ready(Ok(user.to_owned()))
} else {
error!("No user was found while validating token");
ready(Err(error::ErrorUnauthorized(
json!({"message":"invalid token provided"}),
log::error!("No user was found while validating token");
ready(Err(actix_web::error::ErrorUnauthorized(
serde_json::json!({"message":"invalid token provided"}),
)))
}
}
Expand Down Expand Up @@ -173,7 +173,7 @@ impl FromRequest for TenantConfig {
) -> Self::Future {
let result = req.extensions().get::<Self>().cloned().ok_or_else(|| {
log::error!("Tenant config not found");
error::ErrorInternalServerError("Tenant config not found")
actix_web::error::ErrorInternalServerError("Tenant config not found")
});

ready(result)
Expand Down

0 comments on commit d1b62e3

Please sign in to comment.