Changed the error message when attempting to add redfish endpoint

This commit is contained in:
David J. Allen 2023-10-25 12:13:53 -06:00
parent 47f773df2a
commit c5611f598f

View file

@ -53,7 +53,7 @@ func AddRedfishEndpoint(data []byte, headers map[string]string) error {
if res != nil { if res != nil {
statusOk := res.StatusCode >= 200 && res.StatusCode < 300 statusOk := res.StatusCode >= 200 && res.StatusCode < 300
if !statusOk { if !statusOk {
return fmt.Errorf("could not add redfish endpoint") return fmt.Errorf("returned status code %d when adding endpoint", res.StatusCode)
} }
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body)) fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
} }