   end
 
   defp parse_snapshot_response(error) do
-    error
+    {:error, error}
   end
 end

    end
  end

  defp parse_snapshot_response(%HTTPotion.Response{status_code: 200} = response) do
    case Util.is_jpeg(response.body) do
      true -> {:ok, response.body}


  alias EvercamMedia.HTTPClient
  alias EvercamMedia.Snapshot.Util
  require Logger

  @doc """
  Connect to the camera and get the snapshot
