I am wondering about the correct Content-Type header to use when returning an exception.
From here, I uderstand that the server should use the following Content-Type header value: application/problem+json, as defined in section 6.1 of the IETF RFC 7807.
On the other hand, from the API-Common-Part-1_1_0.yaml, it seems that the responses 400 and 500 should use: application/json.
I am wondering about the correct Content-Type header to use when returning an exception.
From here, I uderstand that the server should use the following Content-Type header value:
application/problem+json
, as defined in section 6.1 of the IETF RFC 7807.On the other hand, from the API-Common-Part-1_1_0.yaml, it seems that the responses
400
and500
should use:application/json
.Correct me if I am wrong but, I think that the API-Common-Part-1_1_0.yaml should be updated to use
application/problem+json
as done there, in example: https://github.com/GeoLabs/ogcapi-processes/blob/master/core/openapi/responses/ServerError.yaml.