camaraproject / QualityOnDemand

Repository to describe, develop, document and test the QualityOnDemand API family
https://wiki.camaraproject.org/x/zwOeAQ
Apache License 2.0
41 stars 59 forks source link

Content type for http error response should be of type "application/problem+json" #85

Closed sfnuser closed 1 year ago

sfnuser commented 1 year ago

While create a PR for #83, I noted that all the error responses in the spec that carry ErrorInfo schema in the body should have the content type set to application/problem+json instead of application/json.

I decided to create this as a separate issue so that a PR release can be planned accordingly.

eric-murray commented 1 year ago

I've no issue with using application/problem+json for errors rather than application/json, but the client will find RFC 7807 no help at all for interpreting the fields that are currently returned.

Do you also plan to propose changes to the CAMARA design guidelines to make error responses RFC 7807 compliant? If not, then this could be misleading for the client, who might have a common way of processing any errors labelled application/problem+json.

sfnuser commented 1 year ago

I agree. Also, none of the CAMARA APIs seems to return RFC 7807 compliant error response. Modifying QoD API alone to change ErrorInfo to problem details format may not make sense at this point unless it is driven from the Commonalities group.

hdamker commented 1 year ago

Discussed, can be closed. Further discussion within Commanalities.