From d836333d64ae868fcc5cb66d16c63ec5ebddb1b4 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Mon, 24 Dec 2018 11:42:04 +0800 Subject: [PATCH] Expose real error message of BadRequest error --- vendor/github.com/huaweicloud/golangsdk/errors.go | 6 +++++- vendor/vendor.json | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/vendor/github.com/huaweicloud/golangsdk/errors.go b/vendor/github.com/huaweicloud/golangsdk/errors.go index d358c68ebc..d72718f2dd 100644 --- a/vendor/github.com/huaweicloud/golangsdk/errors.go +++ b/vendor/github.com/huaweicloud/golangsdk/errors.go @@ -108,7 +108,11 @@ type ErrDefault503 struct { } func (e ErrDefault400) Error() string { - return "Invalid request due to incorrect syntax or missing required parameters." + e.DefaultErrString = fmt.Sprintf( + "Bad request with: [%s %s], error message: %s", + e.Method, e.URL, e.Body, + ) + return e.choseErrString() } func (e ErrDefault401) Error() string { return "Authentication failed" diff --git a/vendor/vendor.json b/vendor/vendor.json index 107636dad4..867f31b1dc 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -536,10 +536,10 @@ "revisionTime": "2016-07-20T23:31:40Z" }, { - "checksumSHA1": "iv/mUNL73z3w1olM3yfenJN1chM=", + "checksumSHA1": "0K+NvhiumQVuw7/cLEaYnKJaVWg=", "path": "github.com/huaweicloud/golangsdk", - "revision": "ac957bd394961b1bfacc2406ca12b838e40564d5", - "revisionTime": "2018-12-18T02:13:07Z" + "revision": "88c52136363d73b798253e8ad2a5e6604a433c50", + "revisionTime": "2018-12-24T01:51:05Z" }, { "checksumSHA1": "bcqYL0ILge3Hjxtii7h99crZ8+4=",