Apply suggestions from code review
Co-authored-by: Cole Helbling <cole.helbling@determinate.systems>
This commit is contained in:
parent
5f981d2f91
commit
b41211dc24
|
@ -328,7 +328,7 @@ async fn main_cli() -> Result<()> {
|
||||||
Err(anyhow!(
|
Err(anyhow!(
|
||||||
"Startup notification returned an error: {}\n{}",
|
"Startup notification returned an error: {}\n{}",
|
||||||
response.status(),
|
response.status(),
|
||||||
response.text().await.unwrap_or_else(|_| "".to_owned())
|
response.text().await.unwrap_or_else(|_| "<no response text>".to_owned())
|
||||||
))?;
|
))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,7 @@ async fn post_build_hook(out_paths: &str) -> Result<()> {
|
||||||
Ok(response) if !response.status().is_success() => Err(anyhow!(
|
Ok(response) if !response.status().is_success() => Err(anyhow!(
|
||||||
"magic-nix-cache server failed to enqueue the push request: {}\n{}",
|
"magic-nix-cache server failed to enqueue the push request: {}\n{}",
|
||||||
response.status(),
|
response.status(),
|
||||||
response.text().await.unwrap_or_else(|_| "".to_owned()),
|
response.text().await.unwrap_or_else(|_| "<no response text>".to_owned()),
|
||||||
))?,
|
))?,
|
||||||
Ok(response) => response
|
Ok(response) => response
|
||||||
.json::<api::EnqueuePathsResponse>()
|
.json::<api::EnqueuePathsResponse>()
|
||||||
|
|
Loading…
Reference in a new issue