From 8079e41ebfa1fb52d9c0c792ee54263de144b17d Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 4 May 2021 04:34:08 +0300 Subject: Add verbose error message --- src/handlers.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/handlers.rs') diff --git a/src/handlers.rs b/src/handlers.rs index a9299fe..3e8bafd 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -189,7 +189,10 @@ pub async fn authenticate_user( let res_json = warp::reply::json(&GradeCoinResponse { res: ResponseType::Error, - message: "Given IV has invalid length, use a 128 bit IV".to_owned(), + message: format!( + "Could not create a cipher from given 'temp_key': {:?} and 'IV': {}", + &temp_key, &request.iv + ), }); return Ok(warp::reply::with_status(res_json, StatusCode::BAD_REQUEST)); -- cgit v1.2.3-70-g09d2