@@ -117,7 +117,7 @@ func detectVersionMajor(host string) (string, error) {
|
||||
if res.IsError() {
|
||||
// Print the response status and error information.
|
||||
e, _ := b["error"].(map[string]interface{})
|
||||
return "", fmt.Errorf("[%s] %s: %s", res.Status(), e["type"], e["reason"])
|
||||
return "", fmt.Errorf("[%s] type: %v, reason: %v", res.Status(), e["type"], e["reason"])
|
||||
}
|
||||
|
||||
// get the major version
|
||||
|
||||
@@ -83,6 +83,6 @@ func parseError(response *esapi.Response) error {
|
||||
} else {
|
||||
// Print the response status and error information.
|
||||
e, _ := e["error"].(map[string]interface{})
|
||||
return fmt.Errorf("%s: %s", e["type"], e["reason"])
|
||||
return fmt.Errorf("type: %v, reason: %v", e["type"], e["reason"])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,6 @@ func parseError(response *esapi.Response) error {
|
||||
} else {
|
||||
// Print the response status and error information.
|
||||
e, _ := e["error"].(map[string]interface{})
|
||||
return fmt.Errorf("%s: %s", e["type"], e["reason"])
|
||||
return fmt.Errorf("type: %v, reason: %v", e["type"], e["reason"])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,6 @@ func parseError(response *esapi.Response) error {
|
||||
} else {
|
||||
// Print the response status and error information.
|
||||
e, _ := e["error"].(map[string]interface{})
|
||||
return fmt.Errorf("%s: %s", e["type"], e["reason"])
|
||||
return fmt.Errorf("type: %v, reason: %v", e["type"], e["reason"])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user