public async Task Invoke(HttpContext httpContext, IBusinessExceptionLogs iBusinessExceptionLogs) { try { await _next(httpContext); } catch (Exception ex) { await HandleException(httpContext, ex, iBusinessExceptionLogs); } }
public ExceptionLogsController(IBusinessExceptionLogs iBusinessExceptionLogs) { _iBusinessExceptionLogs = iBusinessExceptionLogs; }
private async Task <Task> HandleException(HttpContext context, Exception exception, IBusinessExceptionLogs iBusinessExceptionLogs) { var requestResult = new RequestResult(); try { await iBusinessExceptionLogs.Create(default, exception, Assembly.GetExecutingAssembly().GetName().Name);