From 72f30eb937c63433c83eefb35e534eacb0f77df4 Mon Sep 17 00:00:00 2001 From: Elitsa Marinovska Date: Tue, 18 Jan 2022 15:19:05 +0100 Subject: [PATCH] Adding else case --- src/Umbraco.Web/WebApi/EnableDetailedErrorsAttribute.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/WebApi/EnableDetailedErrorsAttribute.cs b/src/Umbraco.Web/WebApi/EnableDetailedErrorsAttribute.cs index 5d6d53ab52..ef07dfcb79 100644 --- a/src/Umbraco.Web/WebApi/EnableDetailedErrorsAttribute.cs +++ b/src/Umbraco.Web/WebApi/EnableDetailedErrorsAttribute.cs @@ -16,8 +16,10 @@ namespace Umbraco.Web.WebApi { actionContext.ControllerContext.Configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always; } - - actionContext.ControllerContext.Configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Default; + else + { + actionContext.ControllerContext.Configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Default; + } } } }