Open
Description
This is related to changes introduced in #1117
The previous implementation of HttpSyncGraphQlTransport#execut used RestClient#retrieve, so when there was an error it threw an HttpClientErrorException or HttpServerErrorException which contained the response body. That could be logged and was useful for troubleshooting.
Currently, if the server uses the old content-type (application/json), as RestClient#exchange is used the exception thrown is only HttpClientErrorException (note there is no implementation for 5xx responses, so a client exception will be thrown) and it does not contain the response body.
I think it would be useful to keep the response body in the exceptions and also to keep the HttpServerErrorException behavior.