Skip to content

Commit 77a8d07

Browse files
committed
When exception is rised on view (or partial, or partial action) then blank page is cached.
Fix: check on OnResultExecuted if there is exception on filterContext and execute proper Callback
1 parent 163cab4 commit 77a8d07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DevTrends.MvcDonutCaching/DonutOutputCacheAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public override void OnActionExecuting(ActionExecutingContext filterContext)
100100

101101
public override void OnResultExecuted(ResultExecutedContext filterContext)
102102
{
103-
ExecuteCallback(filterContext, false);
103+
ExecuteCallback(filterContext, hasErrors: filterContext.Exception != null);
104104

105105
if (!filterContext.IsChildAction)
106106
{

0 commit comments

Comments
 (0)