health: don't show login error details with context cancelations

Fixes #12991

Change-Id: I2a5e109395761b720ecf1069d0167cf0caf72876
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/13002/head
Brad Fitzpatrick 3 months ago committed by Brad Fitzpatrick
parent 655b4f8fc5
commit cc370314e7

@ -6,6 +6,7 @@
package health
import (
"context"
"errors"
"fmt"
"maps"
@ -987,8 +988,12 @@ func (t *Tracker) updateBuiltinWarnablesLocked() {
}
if t.lastLoginErr != nil {
var errMsg string
if !errors.Is(t.lastLoginErr, context.Canceled) {
errMsg = t.lastLoginErr.Error()
}
t.setUnhealthyLocked(LoginStateWarnable, Args{
ArgError: t.lastLoginErr.Error(),
ArgError: errMsg,
})
return
} else {

Loading…
Cancel
Save