         ControllerHelpers.render_error(conn, 400, gettext("Invalid id."))
     end
   end
-end+end

        conn

      {:error, _} ->
        ControllerHelpers.render_error(conn, 429, gettext("Trying same host too frequently. Try again in a minute."))
    end
  end


    # For validation purposes we convert back from ASCII to Unicode.
    # TODO: Make all this less messy
    URI.to_string(%URI{
      host: url.host |> :idna.from_ascii() |> List.to_string() |> String.downcase(),
      path: url.path,
      query: url.query,
      scheme: "http"
    })
    |> ValidUrl.validate()
    |> case do
      true ->
        conn

      false ->
        ControllerHelpers.render_error(
          conn,
          400,
          gettext("Invalid URL: %{url}", url: conn.assigns.input_url)
        )
    end
  end

  def check_for_bots(conn, _params) do
