ref: Treat 301/302 upload_chunks response codes as errors
@@ -1058,9 +1058,16 @@ impl Api {
None => request,
};
- request.send()?.into_result()?;
+ // Handle 301 or 302 requests as a missing project
+ let resp = request.send()?;
+ match resp.status() {
+ 301 | 302 => Err(ApiErrorKind::ProjectNotFound.into()),
+ _ => {
+ resp.into_result()?;
Ok(())
}
+ }
+ }
/// Associate apple debug symbols with a build
pub fn associate_apple_dsyms(
