mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Added error messages for checks
This commit is contained in:
parent
477bbdeece
commit
1aab3796be
1 changed files with 4 additions and 0 deletions
|
|
@ -487,6 +487,8 @@ func CollectSystems(c *gofish.APIClient, q *QueryParams) ([]byte, error) {
|
|||
continue
|
||||
}
|
||||
interfaces = append(interfaces, ethernetInterface...)
|
||||
} else {
|
||||
return nil, fmt.Errorf("no ID found for member")
|
||||
}
|
||||
}
|
||||
i, err := json.Marshal(interfaces)
|
||||
|
|
@ -497,6 +499,8 @@ func CollectSystems(c *gofish.APIClient, q *QueryParams) ([]byte, error) {
|
|||
"Data": nil,
|
||||
"EthernetInterfaces": string(i),
|
||||
})
|
||||
} else {
|
||||
return nil, fmt.Errorf("no members found in systems")
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue