RESTier does not actionably handle model building exceptions. #432
Milestone
Comments
This was referenced Jun 9, 2016
Throw the inner exception now, let me know if you have any more suggestions or comments, if not, help to close the issue, thanks. |
Close the issue as no response for about 2 weeks. If you have any more suggestions or comments, open new issues. thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Assemblies Affected
RESTier 0.5.0-beta
Steps to Reproduce
Expected Result
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).
Actual Result
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.
The text was updated successfully, but these errors were encountered: