Including fatal log of API error description.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
This commit is contained in:
parent
dd6494b9e8
commit
f282a95bf8
@ -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"]
|
||||||
|
Loading…
Reference in New Issue
Block a user