From the Glance's perspective, I think the response content type should follow the content type http request provided/required, currently glance only support application/json [0] (and that's the reason why only json serializer and de-serializer was implemented there), other project followed this approach as well, e.g. cinder support json and xml request so there are two kinds of serializer and de-serializer. IMO the fault stuff need to follow this rule as well, e.g. cinder one [1], so glance could just return json content.
But I see the point this bug reported, so from end user's opinion, a human readable with nice error message would be better, so I think we can just format it in client side. And more, I think keep server always return the response with requested content-type is better for non-human client - a code/application handling.
Base on my above thoughts, in sort, IMO, we could fix this in glanceclient directly instead of changing glance server side.
From the Glance's perspective, I think the response content type should follow the content type http request provided/required, currently glance only support application/json [0] (and that's the reason why only json serializer and de-serializer was implemented there), other project followed this approach as well, e.g. cinder support json and xml request so there are two kinds of serializer and de-serializer. IMO the fault stuff need to follow this rule as well, e.g. cinder one [1], so glance could just return json content.
[0] https:/ /github. com/openstack/ glance/ blob/master/ glance/ common/ wsgi.py# L535 /github. com/openstack/ cinder/ blob/master/ cinder/ api/openstack/ wsgi.py# L1260
[2] https:/
But I see the point this bug reported, so from end user's opinion, a human readable with nice error message would be better, so I think we can just format it in client side. And more, I think keep server always return the response with requested content-type is better for non-human client - a code/application handling.
Base on my above thoughts, in sort, IMO, we could fix this in glanceclient directly instead of changing glance server side.