mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -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
|
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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue