From 09f6e35326d15f9d415b052118228a13fa7421ae Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Wed, 24 Jan 2024 18:14:05 +0100 Subject: Log unexpected S3 operation failure --- rs/server/src/main.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rs/server/src/main.rs b/rs/server/src/main.rs index 68ef3b0..0a37155 100644 --- a/rs/server/src/main.rs +++ b/rs/server/src/main.rs @@ -468,7 +468,8 @@ async fn handle_upload_object( } } Err(SdkError::ServiceError(e)) if e.err().is_not_found() => {} - _ => { + Err(e) => { + println!("Failed to HeadObject (repo {repo}, OID {}): {e}", obj.oid); return Some(BatchResponseObject::error( obj, StatusCode::INTERNAL_SERVER_ERROR, @@ -539,12 +540,13 @@ async fn handle_download_object( .await { Ok(result) => result, - Err(_) => { + Err(e) => { + println!("Failed to HeadObject (repo {repo}, OID {}): {e}", obj.oid); return BatchResponseObject::error( obj, StatusCode::INTERNAL_SERVER_ERROR, "Failed to query object information".to_string(), - ) + ); } }; @@ -908,7 +910,8 @@ async fn obj_download( .await { Ok(result) => result, - Err(_) => { + Err(e) => { + println!("Failed to GetObject (repo {repo}, OID {oid}): {e}"); return ( StatusCode::INTERNAL_SERVER_ERROR, "Failed to query object information", -- cgit v1.2.3