As all you know (else follow this question) the requesting
Accept header allows client to specify the expected MIME types for response content.
But my case is:
- client indicates an
- server process the request but encounters an error, so it has to return other status code different from
200 OK, and a JSON with information about error, so
Content-type: application/jsonis the response
So I have a few questions:
- Is this case a typical
406 Not Acceptableresponse status code?
- Is so ugly to return other
Content-typenot matching the requested
Also I got to the RFC 7807 but I don't see anyway how will solve, because the returned
Content-type still not matching the requested ones.