public virtual async Task <object> HandleExceptionAsync(IRequest request, TRequest requestDto, Exception ex) { var errorResponse = HandleException(request, requestDto, ex) ?? await AppHost.OnServiceException(request, requestDto, ex) ?? DtoUtils.CreateErrorResponse(requestDto, ex); AfterEachRequest(request, requestDto, errorResponse ?? ex); return(errorResponse); }