Skip to content
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

When Async is used, Seems like isFiltered in ElmahHandleErrorApiAttribute throws Exception when no current HttpContext #24

Open
karthikeyanmadhavan opened this issue Nov 1, 2017 · 0 comments

Comments

@karthikeyanmadhavan
Copy link

at Elmah.Contrib.WebApi.ElmahHandleErrorApiAttribute.IsFiltered(HttpActionExecutedContext context)
at Elmah.Contrib.WebApi.ElmahHandleErrorApiAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)

private static bool IsFiltered(HttpActionExecutedContext context)
{
var config = HttpContext.Current.GetSection("elmah/errorFilter") as ErrorFilterConfiguration;
if (config == null) return false;
var testContext = new ErrorFilterModule.AssertionHelperContext( context.Exception, HttpContext.Current);
return config.Assertion.Test(testContext);
}

@karthikeyanmadhavan karthikeyanmadhavan changed the title Seems like isFiltered in ElmahHandleErrorApiAttribute throws Exception when no current HttpContext when Async is used When Async is used, Seems like isFiltered in ElmahHandleErrorApiAttribute throws Exception when no current HttpContext Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant