Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ion Cracea 12 posts 93 karma points
    Apr 09, 2020 @ 13:47
    Ion Cracea
    0

    Is it possible to set ExceptionFilterAttribute On Surface Controller ?

    Hi, I've tried to create a ExceptionFilterAttribute.

        public class ApiExceptionFilter : ExceptionFilterAttribute
    {
        public override void OnException(HttpActionExecutedContext context)
        {
            base.OnException(context);
        }
    }
    

    And set the attribute to the Surface controller

    [ApiExceptionFilter]
    public class MyController : Umbraco.Web.Mvc.RenderMvcController
    {
    
    }
    

    But whenever a request is thrown in this controller, it doesn't hit the ApiExceptionFilter

    Any ideas? Thank you.

Please Sign in or register to post replies

Write your reply to:

Draft