So if the server returns unexpected code such as 500, 503, etc, without any json object then the client fails to Unmarshal the data since it's not json. Before we would correctly ignore the message and return the status code in the errobj but now we get an err from the Unmarshal call and return that the caller and thus the client does not know why the request was rejected.
As part of this commit: #96 (https://github.com/ardielle/ardielle-tools/commit/e2ddb49f638c3c53ac7cfabbe5fcff0363253ecb#diff-b6ebcf939863983eb4d9dfc8f325ee64) the go client generation replaced:
with the following code:
So if the server returns unexpected code such as 500, 503, etc, without any json object then the client fails to Unmarshal the data since it's not json. Before we would correctly ignore the message and return the status code in the errobj but now we get an err from the Unmarshal call and return that the caller and thus the client does not know why the request was rejected.