Skip to content

Commit

Permalink
fix: parse errors correctly
Browse files Browse the repository at this point in the history
Message metadata might be missing, the easiest usecase is contacting
worker directly using it both as an endpoint and a node.

Fixes siderolabs#7108

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Apr 19, 2023
1 parent 374ef53 commit 7a004a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/talosctl/pkg/talos/helpers/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func CheckErrors[T interface{ GetMetadata() *common.Metadata }](messages ...T) e

for _, msg := range messages {
md := msg.GetMetadata()
if md.Error != "" {
if md != nil && md.Error != "" {
err = AppendErrors(err, fmt.Errorf(md.Error))
}
}
Expand Down

0 comments on commit 7a004a6

Please sign in to comment.