From 3a535a7a925e7e4517d4f50d99bec4a91cb9cdb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 29 Apr 2018 15:44:18 +0300 Subject: [PATCH] Fix AbpExceptionFilter --- .../Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionFilter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionFilter.cs b/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionFilter.cs index 15e65cc343..76d685b8a8 100644 --- a/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionFilter.cs +++ b/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionFilter.cs @@ -76,13 +76,14 @@ namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling var remoteServiceErrorInfo = _errorInfoConverter.Convert(context.Exception); context.Result = new ObjectResult(new RemoteServiceErrorResponse(remoteServiceErrorInfo)); - context.Exception = null; //Handled! var logLevel = context.Exception.GetLogLevel(); Logger.LogWithLevel(logLevel, $"---------- {nameof(RemoteServiceErrorInfo)} ----------"); Logger.LogWithLevel(logLevel, _jsonSerializer.Serialize(remoteServiceErrorInfo, indented: true)); Logger.LogException(context.Exception, logLevel); + + context.Exception = null; //Handled! } } }