fix(updater): Propagate request error (#2439)

pull/2424/head^2
Fabian-Lars 4 months ago committed by GitHub
parent 9229f991fe
commit 6f881293fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,6 @@
---
updater: patch
updater-js: patch
---
Fixed an issue that caused the plugin to emit a `ReleaseNotFound` error instead of a `Reqwest` error when the http request in `check()` failed.

@ -383,7 +383,8 @@ impl Updater {
.send()
.await;
if let Ok(res) = response {
match response {
Ok(res) => {
if res.status().is_success() {
// no updates found!
if StatusCode::NO_CONTENT == res.status() {
@ -404,6 +405,8 @@ impl Updater {
}
}
}
Err(err) => last_error = Some(err.into()),
}
}
// Last error is cleaned on success.

Loading…
Cancel
Save