mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 20:56:51 +00:00
fix(GODT-2437): Silence harmless report to sentry.
This commit is contained in:
@ -18,7 +18,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
@ -240,10 +239,6 @@ func getPathToUpdatedExecutable(
|
|||||||
if err := version.VerifyFiles(kr); err != nil {
|
if err := version.VerifyFiles(kr); err != nil {
|
||||||
vlog.WithError(err).Error("Files failed verification and will be removed")
|
vlog.WithError(err).Error("Files failed verification and will be removed")
|
||||||
|
|
||||||
if err := reporter.ReportMessage(fmt.Sprintf("version %v failed verification: %v", version, err)); err != nil {
|
|
||||||
vlog.WithError(err).Error("Failed to report corrupt update files")
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := version.Remove(); err != nil {
|
if err := version.Remove(); err != nil {
|
||||||
vlog.WithError(err).Error("Failed to remove files")
|
vlog.WithError(err).Error("Failed to remove files")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -214,16 +214,6 @@ func run(c *cli.Context) error {
|
|||||||
return withSingleInstance(settings, locations.GetLockFile(), version, func() error {
|
return withSingleInstance(settings, locations.GetLockFile(), version, func() error {
|
||||||
// Unlock the encrypted vault.
|
// Unlock the encrypted vault.
|
||||||
return WithVault(locations, crashHandler, func(v *vault.Vault, insecure, corrupt bool) error {
|
return WithVault(locations, crashHandler, func(v *vault.Vault, insecure, corrupt bool) error {
|
||||||
// Report insecure vault.
|
|
||||||
if insecure {
|
|
||||||
_ = reporter.ReportMessageWithContext("Vault is insecure", map[string]interface{}{})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Report corrupt vault.
|
|
||||||
if corrupt {
|
|
||||||
_ = reporter.ReportMessageWithContext("Vault is corrupt", map[string]interface{}{})
|
|
||||||
}
|
|
||||||
|
|
||||||
if !v.Migrated() {
|
if !v.Migrated() {
|
||||||
// Migrate old settings into the vault.
|
// Migrate old settings into the vault.
|
||||||
if err := migrateOldSettings(v); err != nil {
|
if err := migrateOldSettings(v); err != nil {
|
||||||
|
|||||||
@ -83,15 +83,6 @@ func (user *User) handleRefreshEvent(ctx context.Context, refresh proton.Refresh
|
|||||||
|
|
||||||
l.Info("Handling refresh event")
|
l.Info("Handling refresh event")
|
||||||
|
|
||||||
if err := user.reporter.ReportMessageWithContext("Warning: refresh occurred", map[string]interface{}{
|
|
||||||
"EventLoop": map[string]interface{}{
|
|
||||||
"EventID": eventID,
|
|
||||||
"Refresh": refresh,
|
|
||||||
},
|
|
||||||
}); err != nil {
|
|
||||||
l.WithError(err).Error("Failed to report refresh to sentry")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Abort the event stream
|
// Abort the event stream
|
||||||
defer user.pollAbort.Abort()
|
defer user.pollAbort.Abort()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user