Skip to content

Commit 94fa6d9

Browse files
committed
ipn/ipnlocal: log errors while fetching serial numbers
If the client cannot fetch a serial number, write a log message helping the user understand what happened. Also, don't just return the error immediately, since we still have a chance to collect network interface addresses. Updates tailscale#5902 Signed-off-by: Anton Tolchanov <[email protected]>
1 parent 0d76d7d commit 94fa6d9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ipn/ipnlocal/c2n.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,10 @@ func handleC2NPostureIdentityGet(b *LocalBackend, w http.ResponseWriter, r *http
332332
}
333333

334334
if choice.ShouldEnable(b.Prefs().PostureChecking()) {
335-
sns, err := posture.GetSerialNumbers(b.logf)
335+
res.SerialNumbers, err = posture.GetSerialNumbers(b.logf)
336336
if err != nil {
337-
http.Error(w, err.Error(), http.StatusInternalServerError)
338-
return
337+
b.logf("c2n: GetSerialNumbers returned error: %v", err)
339338
}
340-
res.SerialNumbers = sns
341339

342340
// TODO(tailscale/corp#21371, 2024-07-10): once this has landed in a stable release
343341
// and looks good in client metrics, remove this parameter and always report MAC

0 commit comments

Comments
 (0)