Skip to content

Commit

Permalink
bug: silent pass when API is 404
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Oct 9, 2024
1 parent 9bb7b72 commit 28a1ddc
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 28a1ddc

Please sign in to comment.