public async Task ChangeDeploymentUpdateStatus(DeploymentUpdate deploymentUpdate, DeploymentUpdateStatus status) { _deploymentUpdates[deploymentUpdate] = status; if (_notificationHandles.TryGetValue(deploymentUpdate, out var handle)) { try { _log.LogInformation("Submitting {@DeploymentUpdate} notification change to slack {@MessageHandle}. ", deploymentUpdate, handle); var newHandle = await _slackClient.UpdateDeploymentUpdateNotification(handle, deploymentUpdate, status); _notificationHandles.TryUpdate(deploymentUpdate, newHandle, handle); } catch (Exception e) { _log.LogError(e, "Failed to submit {@DeploymentUpdate} notification {@MessageHandle}", deploymentUpdate, handle); } } }