Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

Edited Issue: Exceptions in DefaultODataPathHandler result in 500 [909]

$
0
0
ODataExceptions in DefaultODataPathHandler mean that the incoming request is incorrect or not supported. These should result in 404 or 400 rather than a 500.

For now, a workaround would be to have a custom path handler that looks like this,
```
public class CustomPathHandler : DefaultODataPathHandler
{
public override ODataPath Parse(IEdmModel model, string odataPath)
{
try
{
return base.Parse(model, odataPath);
}
catch (ODataException e)
{
return null;
}
}
}
```

Viewing all articles
Browse latest Browse all 7925

Trending Articles



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