From 26dec61b10f811f3f0374c9fd19aa8b65a77c74e Mon Sep 17 00:00:00 2001 From: Cristen Jones Date: Wed, 11 Sep 2024 15:06:56 -0400 Subject: [PATCH] hotfix(TripPlanController): better fallback clause --- lib/dotcom_web/controllers/trip_plan_controller.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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