We now send a HTML error document, even when the content type of the controller will be something different.
We also don't check what the user agent accepts.
Maybe it is possible to determine the probable content type by calling content_types_provided and check it against the accept headers.
That is just like steps v3c3 and v3c4 in the webmachine_decision_core.erl
See also: zotonic/webzmachine#6
Has been fixed in controller_error.