Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
RESTier does not actionably handle model building exceptions. #432
If you have an entity in your model that leverages a View, OR you simply forget to add a key onto a Code First model, RESTier throws an exception in such a way that the debugger doesn't pause on the offending code.
Steps to Reproduce
I would expect that I'd get an exception that can be directly handled, or at least displayed to the end user in a way that gets them the answer quickly. (I believe Issue #436 is an example of this in action).
A System.AggregateException is being thrown because the GetModelAsync() function is asynchronous, meaning that the real exception is being wrapped. Because the exception is happening really far up the chain, the debugger can't point you to a line of code causing the problem. Because of the examples and documentation, it's not obvious where or how to handle this exception.