UM7ZOLPMCXNLDP6J4AIFEONJK6YI7BWADKTF7PB5ZNDQZSTUFMAAC
bail!("HTTP error {:?}", res.status())
let status = res.status();
let is_nest = matches!(res.url().domain(), Some("nest.pijul.com"));
match serde_json::from_slice::<libpijul::RemoteError>(&*res.bytes().await?) {
Ok(remote_err) => return Err(remote_err.into()),
Err(_) if status.as_u16() == 404 && is_nest => bail!("Requested nest repository not found"),
Err(_) => bail!("Http request failed with status code: {}", status)
}