mirror of
https://github.com/bitwarden/server
synced 2026-01-30 16:23:37 +00:00
Fix api log messages
This commit is contained in:
@@ -24,7 +24,7 @@ pub async fn batch_lookup_handler(
|
||||
State(AppState { directory, .. }): State<AppState>,
|
||||
Json(BatchLookupRequest { labels_b64 }): Json<BatchLookupRequest>,
|
||||
) -> (StatusCode, Json<Response<BatchLookupData>>) {
|
||||
info!("Handling get public key request");
|
||||
info!("Handling batch lookup request");
|
||||
let labels = labels_b64
|
||||
.into_iter()
|
||||
.map(|label_b64| label_b64.into())
|
||||
@@ -40,7 +40,7 @@ pub async fn batch_lookup_handler(
|
||||
})),
|
||||
),
|
||||
Err(e) => {
|
||||
error!(err = ?e, "Failed to get AKD public key");
|
||||
error!(err = ?e, "Failed to perform batch lookup");
|
||||
(StatusCode::INTERNAL_SERVER_ERROR, Json(Response::fail(e)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ pub async fn key_history_handler(
|
||||
history_params,
|
||||
}): Json<KeyHistoryRequest>,
|
||||
) -> (StatusCode, Json<Response<HistoryData>>) {
|
||||
info!("Handling get public key request");
|
||||
info!("Handling get key history request");
|
||||
let history_proof = directory.key_history(&label, history_params.into()).await;
|
||||
|
||||
match history_proof {
|
||||
@@ -63,7 +63,7 @@ pub async fn key_history_handler(
|
||||
})),
|
||||
),
|
||||
Err(e) => {
|
||||
error!(err = ?e, "Failed to get AKD public key");
|
||||
error!(err = ?e, "Failed to get key history");
|
||||
(StatusCode::INTERNAL_SERVER_ERROR, Json(Response::fail(e)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ pub async fn lookup_handler(
|
||||
State(AppState { directory, .. }): State<AppState>,
|
||||
Json(LookupRequest { label_b64 }): Json<LookupRequest>,
|
||||
) -> (StatusCode, Json<Response<LookupData>>) {
|
||||
info!("Handling get public key request");
|
||||
info!("Handling lookup request");
|
||||
let lookup_proof = directory.lookup(label_b64.into()).await;
|
||||
|
||||
match lookup_proof {
|
||||
@@ -45,7 +45,7 @@ pub async fn lookup_handler(
|
||||
})),
|
||||
),
|
||||
Err(e) => {
|
||||
error!(err = ?e, "Failed to get AKD public key");
|
||||
error!(err = ?e, "Failed to perform lookup");
|
||||
(StatusCode::INTERNAL_SERVER_ERROR, Json(Response::fail(e)))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user