fix: parse errors correctly
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>
This commit is contained in:
parent
374ef53853
commit
7a004a6f7f
@ -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))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user