I have a REST API with POST method and it works fine. But on a custom 400 status code error response the content-type seems to be html rather than json.
Sample:
400 , 79ms, 23 bytes
api_status_code: SIM400-05 connection: close content-type: text/html;charset=UTF-8 date: Mon, 13 Jun 2022 14:31:15 GMT transfer-encoding: chunked x-ords_debug: false
Invalid Account Number
I have tried adding "REST-Framework-Version" as 4 in my request header but still the error response is as html and not json.
Oracle APEX: 21.1 Oracle ORDS: 21
400
is an HTTP protocol-level error, so it is returned as HTTP. JSON content will only be returned by a successful completion (HTTP status 200) of the API call.