diff options
Diffstat (limited to 'src/types/extract.rs')
-rw-r--r-- | src/types/extract.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/types/extract.rs b/src/types/extract.rs index 399fe67..69c6ed8 100644 --- a/src/types/extract.rs +++ b/src/types/extract.rs @@ -27,6 +27,7 @@ impl<S> FromRequestParts<S> for AuthorizedUser where S: Send + Sync { }; let Ok(user) = User::from_user_id(session.user_id, true) else { + tracing::error!("Valid token but no valid user"); return Err(ResponseCode::InternalServerError.text("Valid token but no valid user")) }; @@ -84,6 +85,7 @@ impl<T, S, B> FromRequest<S, B> for Json<T> where async fn from_request(mut req: Request<B>, state: &S) -> Result<Self> { let Ok(ConnectInfo(info)) = req.extract_parts::<ConnectInfo<SocketAddr>>().await else { + tracing::error!("Failed to read connection info"); return Err(ResponseCode::InternalServerError.text("Failed to read connection info")); }; let method = req.method().clone(); @@ -91,6 +93,7 @@ impl<T, S, B> FromRequest<S, B> for Json<T> where let uri = req.uri().clone(); let Ok(bytes) = Bytes::from_request(req, state).await else { + tracing::error!("Failed to read request body"); return Err(ResponseCode::InternalServerError.text("Failed to read request body")); }; |