Hi,
all errors are written with text/plain; charset=utf-8
encoding. you can’t change it.
one exception: if client’s request is handled with HTTPServer.OnCustomResponseEvent , you can add post-processing and change everything: content type, response code, response itself, etc.
pls review Using OnCustomResponseEvent in a ROSDK Server snippet.
related topics to that snippet will contain examples of usage including HttpApi.
this will work for all requests - usual and ones via HttpApi.