mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 03:31:39 +00:00
health: don't show login error details with context cancelations
Fixes #12991 Change-Id: I2a5e109395761b720ecf1069d0167cf0caf72876 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
655b4f8fc5
commit
cc370314e7
@ -6,6 +6,7 @@
|
|||||||
package health
|
package health
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"maps"
|
"maps"
|
||||||
@ -987,8 +988,12 @@ func (t *Tracker) updateBuiltinWarnablesLocked() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if t.lastLoginErr != nil {
|
if t.lastLoginErr != nil {
|
||||||
|
var errMsg string
|
||||||
|
if !errors.Is(t.lastLoginErr, context.Canceled) {
|
||||||
|
errMsg = t.lastLoginErr.Error()
|
||||||
|
}
|
||||||
t.setUnhealthyLocked(LoginStateWarnable, Args{
|
t.setUnhealthyLocked(LoginStateWarnable, Args{
|
||||||
ArgError: t.lastLoginErr.Error(),
|
ArgError: errMsg,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user