Skip to content

Commit ba31ca6

Browse files
committed
rust: ignore HTTP 422 when uploading
This is likely due to an existing artifact so it can be ignored.
1 parent 5f5fb60 commit ba31ca6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/github.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ pub async fn command_upload_release_distributions(args: &ArgMatches<'_>) -> Resu
269269

270270
let response = client.execute(request).await?;
271271

272+
if response.status() == 422 {
273+
println!("HTTP 422 when uploading {}; ignoring", filename);
274+
continue;
275+
}
276+
272277
if !response.status().is_success() {
273278
return Err(anyhow!("HTTP {}", response.status()));
274279
}

0 commit comments

Comments
 (0)