     rescue
       e in Ecto.InvalidChangesetError ->
         BotState.set_sync_status(:sync_error)
-        Logger.error(1, "Failed to apply sync_cmd: (#{repo}) #{inspect(sync_cmd)} (#{e.action})")
+        Logger.error(1, "Failed to apply sync_cmd: #{inspect(sync_cmd)} (#{e.action})")
         fix_repo(repo, sync_cmd)
       _ ->
         BotState.set_sync_status(:sync_error)
-        Logger.error(1, "Failed to apply sync_cmd: (#{repo}) #{inspect(sync_cmd)}")
+        Logger.error(1, "Failed to apply sync_cmd: #{inspect(sync_cmd)}")
         fix_repo(repo, sync_cmd)
     end
   end


  def handle_call(:flip, _, %{repos: [repo_a, repo_b]} = state) do
    maybe_cancel_timer(state.timer)
    Logger.busy(3, "Syncing")
    Farmbot.FarmEvent.Manager.wait_for_sync()
    BotState.set_sync_status(:syncing)

    # Fetch all sync_cmds and apply them in order they were received.

    mod = Module.concat(["Farmbot", "Repo", kind])

    if Code.ensure_loaded?(mod) do
      Logger.busy(3, "Applying sync_cmd (#{mod}): insert_or_update")

      # We need to check if this object exists in the database.
      case repo.get(mod, id) do
