             :ets.delete_object(key_ets, current)
             register_key(:unique, pid_server, key_ets, key, entry)
           end
+
         [] ->
           register_key(:unique, pid_server, key_ets, key, entry)
       end

    true = :ets.insert(key_ets, entry)
    {:ok, pid_server}
  end
  defp register_key(:unique, pid_server, key_ets, key, entry) do
    if :ets.insert_new(key_ets, entry) do
      {:ok, pid_server}

      :ok
    catch
      :error, :badarg ->
        raise ArgumentError, "unknown registry: #{inspect(registry)}"
    end
  end

