private Task ProcessResponse(TrackingDictionary state, object result, HubRequest request, Exception error) { var exception = error.Unwrap(); string stackTrace = (exception != null && _isDebuggingEnabled) ? exception.StackTrace : null; string errorMessage = exception != null ? exception.Message : null; if (exception != null) { _hubInvocationErrorsTotalCounter.SafeIncrement(); _hubInvocationErrorsPerSecCounter.SafeIncrement(); _allErrorsTotalCounter.SafeIncrement(); _allErrorsPerSecCounter.SafeIncrement(); } var hubResult = new HubResponse { State = state.GetChanges(), Result = result, Id = request.Id, Error = errorMessage, StackTrace = stackTrace }; return(_transport.Send(hubResult)); }
private Task ProcessResponse(TrackingDictionary state, object result, HubRequest request, Exception error) { var exception = error.Unwrap(); string stackTrace = (exception != null && _isDebuggingEnabled) ? exception.StackTrace : null; string errorMessage = exception != null ? exception.Message : null; var hubResult = new HubResponse { State = state.GetChanges(), Result = result, Id = request.Id, Error = errorMessage, StackTrace = stackTrace }; return(_transport.Send(hubResult)); }