Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Issue: Considering support ModelState error in ODataError [565]

$
0
0
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?

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>