refine es error format

Signed-off-by: huanggze <loganhuang@yunify.com>
This commit is contained in:
huanggze
2019-10-17 17:23:26 +08:00
parent 90961a24df
commit 684632d9ac
4 changed files with 4 additions and 4 deletions

View File

@@ -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"])
}
}