Skip to content

Commit

Permalink
bug: silent pass when API not 200 (#222)
Browse files Browse the repository at this point in the history
* bug: silent pass when API is 404

* bug: silent pass when API is 404
  • Loading branch information
shrimalmadhur authored Oct 10, 2024
1 parent 9bb7b72 commit 08c43fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/versionupdate/check_version_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ func Check(currentVersion string) {
return
}
defer response.Body.Close()
if response.StatusCode != http.StatusOK {
// If we can't get the latest version, just return
return
}

respBytes, err := io.ReadAll(response.Body)
if err != nil {
return
Expand Down

0 comments on commit 08c43fc

Please sign in to comment.