Including fatal log of API error description.

Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
This commit is contained in:
Rob Dobson 2014-11-14 18:25:01 +00:00
parent dd6494b9e8
commit f282a95bf8

View File

@ -106,6 +106,7 @@ func (client *XenAPIClient) APICall (result *APIResult, method string, params ..
if result.Status != "Success" { if result.Status != "Success" {
fmt.Println("Encountered an API error: ", result.Status) fmt.Println("Encountered an API error: ", result.Status)
fmt.Println(res["ErrorDescription"]) fmt.Println(res["ErrorDescription"])
log.Fatal(res["ErrorDescription"])
return errors.New("API Error occurred") return errors.New("API Error occurred")
} else { } else {
result.Value = res["Value"] result.Value = res["Value"]