WebThingsIO / gateway

WebThings Gateway
http://webthings.io/gateway
Mozilla Public License 2.0
2.61k stars 335 forks source link

All HTTP error responses containing a body should use the problem details format #3088

Open benfrancis opened 1 year ago

benfrancis commented 1 year ago

The WoT Profile specification says:

If an HTTP error response contains a body, the content of that body MUST conform with the Problem Details format [RFC7807].

Currently there are some error responses which don't conform to this format, e.g. because they contain a plan text error message or print out a JavaScript error object.

In order to comply with the WoT Profile specification we need to modify at least all error responses which fall within the scope of the HTTP Basic Profile and HTTP SSE Profile to follow the Problem Details format, or not send a body at all.