From abc1f367bb1c5fc30fbe9364c663c32b7880d6f7 Mon Sep 17 00:00:00 2001 From: hubert Date: Thu, 22 Jul 2021 13:14:58 +0200 Subject: [PATCH] print error when validating --- src/webutils/auth.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webutils/auth.rs b/src/webutils/auth.rs index 2f0fb91..89d5efa 100644 --- a/src/webutils/auth.rs +++ b/src/webutils/auth.rs @@ -1,5 +1,4 @@ use actix_session::Session; -use actix_web::Error; use actix_web_httpauth::extractors::basic::BasicAuth; pub trait AuthValidator { @@ -13,7 +12,10 @@ pub trait AuthValidator { let result = session.get::("user"); match result { Ok(username) => {username.map(|u| User(u))} - Err(e) => {None} + Err(e) => { + println!("{}", e); + None + } } } }