private void DeleteProviderKeysHandler(DeleteProviderKeysRequestMessage request) { Log("Deleting keys..."); var success = true; try { _apiKeyService.DeleteKeys(request.Id); } catch (Exception e) { success = false; Log($"Error while deleting keys: {e.Message}"); } M.SendAsync(new DeleteProviderKeysResponseMessage(request, success)); }
private void DeleteProviderKeysHandler(DeleteProviderKeysRequestMessage request) { Log("Deleting keys..."); DeleteProviderKeysResponseMessage msg; try { _apiKeyService.DeleteKeys(request.Id); msg = new DeleteProviderKeysResponseMessage(request, true); } catch (Exception e) { Log($"Error while deleting keys: {e.Message}"); msg = new DeleteProviderKeysResponseMessage(request, false, e.Message); } M.SendAsync(msg); }