 
   def path(router, other, _path) do
     raise ArgumentError,
-      "expected a %Plug.Conn{}, a %Phoenix.Socket{}, a %URI{} or a Phoenix.Endpoint " <>
-      "when building path for #{inspect router}, got: #{inspect other}"
+      "expected a %Plug.Conn{}, a %Phoenix.Socket{}, a %URI{}, a struct with an :endpoint key, " <>
+      "or a Phoenix.Endpoint when building path for #{inspect(router)}, got: #{inspect(other)}"
   end
 
   ## Helpers


  def url(router, other) do
    raise ArgumentError,
      "expected a %Plug.Conn{}, a %Phoenix.Socket{}, a %URI{} or a Phoenix.Endpoint " <>
      "when building url for #{inspect router}, got: #{inspect other}"
  end

  @doc """

        static_url(private.phoenix_endpoint, path)
      end

      def static_url(%_{endpoint: endpoint} = conn, path) do
        static_url(endpoint, path)
      end

