Added error messages for checks

This commit is contained in:
David Allen 2024-05-16 14:41:17 -06:00
parent 477bbdeece
commit 1aab3796be
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC

View file

@ -487,6 +487,8 @@ func CollectSystems(c *gofish.APIClient, q *QueryParams) ([]byte, error) {
continue continue
} }
interfaces = append(interfaces, ethernetInterface...) interfaces = append(interfaces, ethernetInterface...)
} else {
return nil, fmt.Errorf("no ID found for member")
} }
} }
i, err := json.Marshal(interfaces) i, err := json.Marshal(interfaces)
@ -497,6 +499,8 @@ func CollectSystems(c *gofish.APIClient, q *QueryParams) ([]byte, error) {
"Data": nil, "Data": nil,
"EthernetInterfaces": string(i), "EthernetInterfaces": string(i),
}) })
} else {
return nil, fmt.Errorf("no members found in systems")
} }
} else { } else {