We just dump the output that we get from the server on errors. This has an encoding, and we can get it from the headers, so we should use that and convert it into a string to avoid all the garbage at the end (because we don't know how long the content is).
We just dump the output that we get from the server on errors. This has an encoding, and we can get it from the headers, so we should use that and convert it into a string to avoid all the garbage at the end (because we don't know how long the content is).