By EnableOData in an existing web api project, all the HttpError in the project will be converted to ODataError when client requests application/json or application/xml.<br /><br />The error payload's shape will be changed:<br />Before enable odata:<br />{"Message":"No HTTP resource was found that matches the request URI 'http://localhost:8081/api/Value'.","MessageDetail":"No type was found that matches the controller named 'Value'."}<br /><br />After enable odata:<br />{<br /> "odata.error":{<br /> "code":"","message":{<br /> "lang":"en-US","value":"No HTTP resource was found that matches the request URI 'http://localhost:8081/api/Value'."<br /> }<br /> }<br />}<br /><br />A workaround is to insert JsonMediaTypeFormatter on top of formatters after EnableOData. But it will stop json light working for any application/json request.
Comments: We will revisit this feature in vNext.
Comments: We will revisit this feature in vNext.