aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Sever2021-05-04 04:34:08 +0300
committerYigit Sever2021-05-04 04:34:08 +0300
commit8079e41ebfa1fb52d9c0c792ee54263de144b17d (patch)
tree30f362f60e46d9c0cccd04e283ab0d97c69897a3
parent05aecacaf8522650d2cd2fd01bddfc0585a7fa4e (diff)
downloadgradecoin-8079e41ebfa1fb52d9c0c792ee54263de144b17d.tar.gz
gradecoin-8079e41ebfa1fb52d9c0c792ee54263de144b17d.tar.bz2
gradecoin-8079e41ebfa1fb52d9c0c792ee54263de144b17d.zip
Add verbose error message
-rw-r--r--src/handlers.rs5
1 files changed, 4 insertions, 1 deletions
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(
189 189
190 let res_json = warp::reply::json(&GradeCoinResponse { 190 let res_json = warp::reply::json(&GradeCoinResponse {
191 res: ResponseType::Error, 191 res: ResponseType::Error,
192 message: "Given IV has invalid length, use a 128 bit IV".to_owned(), 192 message: format!(
193 "Could not create a cipher from given 'temp_key': {:?} and 'IV': {}",
194 &temp_key, &request.iv
195 ),
193 }); 196 });
194 197
195 return Ok(warp::reply::with_status(res_json, StatusCode::BAD_REQUEST)); 198 return Ok(warp::reply::with_status(res_json, StatusCode::BAD_REQUEST));