diff --git a/CHANGELOG.md b/CHANGELOG.md index ed9936bc..354b4c3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 5.6.1 (unreleased) +- [PR #694](https://github.com/rqlite/rqlite/pull/694): Display, in the CLI, the HTTP response body on HTTP status 503. + ## 5.6.0 (November 17th 2020) ### New features diff --git a/cmd/rqlite/execute.go b/cmd/rqlite/execute.go index 55ee1cd1..522239c4 100644 --- a/cmd/rqlite/execute.go +++ b/cmd/rqlite/execute.go @@ -81,7 +81,7 @@ func executeWithClient(ctx *cli.Context, client *http.Client, argv *argT, timer } if resp.StatusCode != http.StatusOK { - return fmt.Errorf("server responded with: %s", resp.Status) + return fmt.Errorf("server responded with %s: %s", resp.Status, response) } // Parse response and write results diff --git a/cmd/rqlite/query.go b/cmd/rqlite/query.go index c8d52479..0529c47a 100644 --- a/cmd/rqlite/query.go +++ b/cmd/rqlite/query.go @@ -135,7 +135,7 @@ func queryWithClient(ctx *cli.Context, client *http.Client, argv *argT, timer bo } if resp.StatusCode != http.StatusOK { - return fmt.Errorf("server responded with: %s", resp.Status) + return fmt.Errorf("server responded with %s: %s", resp.Status, response) } // Parse response and write results