New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESTier does not actionably handle model building exceptions. #432

robertmclaws opened this Issue Jun 9, 2016 · 2 comments


None yet
2 participants

robertmclaws commented Jun 9, 2016

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

  • Create a simple code-first Data Model.
  • Add an Entity without a key defined.
  • Bootstrap your API and try to run it with a debugger attached.

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.


This comment has been minimized.


chinadragon0515 commented Jun 24, 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.

@chinadragon0515 chinadragon0515 added this to the 0.6 milestone Jun 29, 2016


This comment has been minimized.


chinadragon0515 commented Jul 5, 2016

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