From 152709498a654eee87c94e9b2962db863b6dc618 Mon Sep 17 00:00:00 2001 From: Ibrahim Rahhal Date: Wed, 1 Apr 2026 11:14:40 +0300 Subject: [PATCH 1/2] Print response for errors when in debug mode --- src/scan.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/scan.rs b/src/scan.rs index 6c72a8a..e9b4a97 100644 --- a/src/scan.rs +++ b/src/scan.rs @@ -198,7 +198,10 @@ pub fn upload_scan(config: &Config, paths: Vec, scanner: String, input: match res { Ok(response) => { if !response.status().is_success() { - eprintln!("Failed to upload file {} {}... retrying", response.status(), path); + let status = response.status(); + let body = response.text().unwrap_or_else(|_| "Unable to read response body".to_string()); + debug(&format!("Code upload failed with status: {}. Response body: {}", status, body)); + eprintln!("Failed to upload file {} {}... retrying", status, path); std::thread::sleep(std::time::Duration::from_secs(1)); attempts += 1; } else { @@ -307,7 +310,10 @@ pub fn upload_scan(config: &Config, paths: Vec, scanner: String, input: } println!("Successfully uploaded scan."); } else { - eprintln!("Failed to upload scan: {}", response.status()); + let status = response.status(); + let body = response.text().unwrap_or_else(|_| "Unable to read response body".to_string()); + debug(&format!("Scan upload failed with status: {}. Response body: {}", status, body)); + eprintln!("Failed to upload scan: {}", status); } } Err(e) => { From 74c68dcb72178d36d1d9f3c68d51a04792001b67 Mon Sep 17 00:00:00 2001 From: Ibrahim Rahhal Date: Wed, 1 Apr 2026 11:15:22 +0300 Subject: [PATCH 2/2] version pumb --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 03c5811..24ae90d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "corgea" -version = "1.8.4" +version = "1.8.5" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html