6

Resolved

Surfaced exceptions in ApiController actions are not logged

description

Unlike how it's with regular controller actions. I.e. if there is an exception thrown in an action that's not caught there but bubbles up to the action's caller there is no corresponding log entry created.

comments

pszmyd wrote Jun 9, 2013 at 11:53 PM

The issue is different. Currently, we do not apply filters to ApiControllers at all, but we should - the same as for MVC controllers.

In WebAPI applying filters is slightly different from MVC. I'm currently in the middle of implementing this, following the same logic as currently exists for MVC filters.

pszmyd wrote Jun 21, 2013 at 10:36 PM

This won't be addressed in 1.7. We need to implement the whole filter provider scheme, similar to what we have for MVC controllers. There's not enough time for that now. 1.7.1 most likely.

sebastienros wrote Aug 8, 2013 at 11:54 PM

Actually a better change could be to use DI for filter and controllers as it has been integrated in MVC 4. Check if it's doable because of multi-tenancy.

sebastienros wrote Dec 6, 2013 at 12:42 AM

Fixed in changeset b374e9814f7c455c8db0521c247418bc6eb62d5c