 
   def process_view_count(view_count_data, team) do
     article = get_article(view_count_data.path, team)
-    new_view_count = create_view_count(article, view_count_data)
 
-    if new_view_count do
-      notify_if_count_spike(article)
+    case create_view_count(article, view_count_data) do
+      {:ok, _} ->
+        notify_if_count_spike(article)
+      {:error, changeset} ->
+        Logger.error "Cannot create view_count: #{inspect changeset}"
+      _ ->
+        nil
     end
   end
 
   defp notify_if_count_spike(article) do
     latest_counts = last_two_counts(article)
+
     if view_count_spike?(latest_counts) do
-      send_spike_message(
-        article,
-        latest_counts
-      )
+      send_spike_message(article,latest_counts)
     end
   end
 

defmodule EspiDni.ViewCountHandler do

  alias EspiDni.Repo
  alias EspiDni.ViewCount
  import EspiDni.Gettext


  defp create_view_count(article, view_count_data) do
    ViewCount.changeset(%ViewCount{}, %{article_id: article.id, count: view_count_data.count})
    |> Repo.insert()
  end

  defp get_article(path, team) do
