We have a simple kendo MVC grid works fine. However, if a bot/scan adds some normally invalid parameters to the querystring, the page throws an exception.
You can see that in action with the Telerik demo page:
This works
https://demos.telerik.com/aspnet-mvc/grid
This throws an exception. If you examine the console, you'll see a 500 error
https://demos.telerik.com/aspnet-mvc/grid?grid-sort=testsort
"testsort" is not a valid column, thus an exception occurs.
The above example isn't *exactly* what's happening with our grid since our grid is bound to a server side Model rather than an ajax source, but the concept is the same. In our page, the Kendo grid throws the error (rather than the ajax source) and the error is
Invalid property or field - '[invalid sort parameter passed in]' for type: [our model]
What is the best way to handle this since the Telerik Grid doesn't handle it automatically? I hate to wrap every grid in a try/catch just because the telerik control doesn't handle an invalid sort param, but I can certainly do that if that's the only option.