File tree Expand file tree Collapse file tree 2 files changed +26
-17
lines changed Expand file tree Collapse file tree 2 files changed +26
-17
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ updater : patch
3
+ updater-js : patch
4
+ ---
5
+
6
+ Fixed an issue that caused the plugin to emit a ` ReleaseNotFound ` error instead of a ` Reqwest ` error when the http request in ` check() ` failed.
Original file line number Diff line number Diff line change @@ -383,26 +383,29 @@ impl Updater {
383
383
. send ( )
384
384
. await ;
385
385
386
- if let Ok ( res) = response {
387
- if res. status ( ) . is_success ( ) {
388
- // no updates found!
389
- if StatusCode :: NO_CONTENT == res. status ( ) {
390
- return Ok ( None ) ;
391
- } ;
392
-
393
- raw_json = Some ( res. json ( ) . await ?) ;
394
- match serde_json:: from_value :: < RemoteRelease > ( raw_json. clone ( ) . unwrap ( ) )
395
- . map_err ( Into :: into)
396
- {
397
- Ok ( release) => {
398
- last_error = None ;
399
- remote_release = Some ( release) ;
400
- // we found a relase, break the loop
401
- break ;
386
+ match response {
387
+ Ok ( res) => {
388
+ if res. status ( ) . is_success ( ) {
389
+ // no updates found!
390
+ if StatusCode :: NO_CONTENT == res. status ( ) {
391
+ return Ok ( None ) ;
392
+ } ;
393
+
394
+ raw_json = Some ( res. json ( ) . await ?) ;
395
+ match serde_json:: from_value :: < RemoteRelease > ( raw_json. clone ( ) . unwrap ( ) )
396
+ . map_err ( Into :: into)
397
+ {
398
+ Ok ( release) => {
399
+ last_error = None ;
400
+ remote_release = Some ( release) ;
401
+ // we found a relase, break the loop
402
+ break ;
403
+ }
404
+ Err ( err) => last_error = Some ( err) ,
402
405
}
403
- Err ( err) => last_error = Some ( err) ,
404
406
}
405
407
}
408
+ Err ( err) => last_error = Some ( err. into ( ) ) ,
406
409
}
407
410
}
408
411
You can’t perform that action at this time.
0 commit comments