Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 8 additions & 2 deletions src/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ pub fn upload_scan(config: &Config, paths: Vec<String>, 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 {
Expand Down Expand Up @@ -307,7 +310,10 @@ pub fn upload_scan(config: &Config, paths: Vec<String>, 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) => {
Expand Down
Loading