feat(BRIDGE-271): report to sentry when version file check fails

This commit is contained in:
Atanas Janeshliev
2024-12-27 15:10:52 +01:00
parent e340e9f845
commit 74a990c69a
2 changed files with 15 additions and 4 deletions

View File

@ -32,9 +32,10 @@ import (
)
var (
ErrDownloadVerify = errors.New("failed to download or verify the update")
ErrInstall = errors.New("failed to install the update")
ErrUpdateAlreadyInstalled = errors.New("update is already installed")
ErrDownloadVerify = errors.New("failed to download or verify the update")
ErrInstall = errors.New("failed to install the update")
ErrUpdateAlreadyInstalled = errors.New("update is already installed")
ErrVersionFileDownloadOrVerify = errors.New("failed to download or verify the version file")
)
type Downloader interface {
@ -72,7 +73,7 @@ func (u *Updater) GetVersionInfo(ctx context.Context, downloader Downloader, cha
u.getVersionFileURL()+".sig",
)
if err != nil {
return VersionInfo{}, err
return VersionInfo{}, fmt.Errorf("%w: %w", ErrVersionFileDownloadOrVerify, err)
}
var versionMap VersionMap