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 #7108

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
(cherry picked from commit 7a004a6)
  • Loading branch information
smira committed Apr 27, 2023
1 parent 447c73b commit 0a00a4e
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 0a00a4e

Please sign in to comment.