Fix AbpExceptionFilter

pull/279/head
Halil İbrahim Kalkan 7 years ago
parent b73c17aa9c
commit 3a535a7a92

@ -76,13 +76,14 @@ namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling
var remoteServiceErrorInfo = _errorInfoConverter.Convert(context.Exception); var remoteServiceErrorInfo = _errorInfoConverter.Convert(context.Exception);
context.Result = new ObjectResult(new RemoteServiceErrorResponse(remoteServiceErrorInfo)); context.Result = new ObjectResult(new RemoteServiceErrorResponse(remoteServiceErrorInfo));
context.Exception = null; //Handled!
var logLevel = context.Exception.GetLogLevel(); var logLevel = context.Exception.GetLogLevel();
Logger.LogWithLevel(logLevel, $"---------- {nameof(RemoteServiceErrorInfo)} ----------"); Logger.LogWithLevel(logLevel, $"---------- {nameof(RemoteServiceErrorInfo)} ----------");
Logger.LogWithLevel(logLevel, _jsonSerializer.Serialize(remoteServiceErrorInfo, indented: true)); Logger.LogWithLevel(logLevel, _jsonSerializer.Serialize(remoteServiceErrorInfo, indented: true));
Logger.LogException(context.Exception, logLevel); Logger.LogException(context.Exception, logLevel);
context.Exception = null; //Handled!
} }
} }
} }

Loading…
Cancel
Save