Discussed with Youssef that ODataError right now doesn't support custom error, so we will lose the modelstate's errors in odata error message.
However, ModelState errors are very common in real application to help caller to identify what's wrong with his parameter. We'd better to support it, otherwise user has to parse the modelstate by themselves to convert to ODataError.
Comments: @SEWilson There's nothing stopping you from sending back an ODataError directly to the client. It would look something like this: ``` public void Get() { throw new HttpResponseException(Request.CreateResponse(new ODataError() { ... })); } ``` You can then shape the error to look any way you like. Does that work for you?
However, ModelState errors are very common in real application to help caller to identify what's wrong with his parameter. We'd better to support it, otherwise user has to parse the modelstate by themselves to convert to ODataError.
Comments: @SEWilson There's nothing stopping you from sending back an ODataError directly to the client. It would look something like this: ``` public void Get() { throw new HttpResponseException(Request.CreateResponse(new ODataError() { ... })); } ``` You can then shape the error to look any way you like. Does that work for you?