diff --git a/lib/dotcom_web/controllers/trip_plan_controller.ex b/lib/dotcom_web/controllers/trip_plan_controller.ex index 4994fc338d..017ea3f45c 100644 --- a/lib/dotcom_web/controllers/trip_plan_controller.ex +++ b/lib/dotcom_web/controllers/trip_plan_controller.ex @@ -59,7 +59,7 @@ defmodule DotcomWeb.TripPlanController do {:ok, [geocoded_from | _]} -> do_from(conn, NamedPosition.new(geocoded_from)) - {:error, _} -> + _ -> # redirect to the initial index page redirect(conn, to: trip_plan_path(conn, :index)) end @@ -123,7 +123,7 @@ defmodule DotcomWeb.TripPlanController do {:ok, [geocoded_to | _]} -> do_to(conn, NamedPosition.new(geocoded_to)) - {:error, _} -> + _ -> # redirect to the initial index page redirect(conn, to: trip_plan_path(conn, :index)) end