Skip to content

Commit

Permalink
fix(TripPlanner): Update the error message to match intent from OTP
Browse files Browse the repository at this point in the history
  • Loading branch information
kotva006 committed Oct 27, 2023
1 parent 9f1485c commit 985019f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/site/lib/site_web/views/trip_compare_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ defmodule SiteWeb.TripCompareView do
outside_bounds: "We can only plan trips inside the MBTA transitshed.",
no_transit_times: "We were unable to plan a trip at the time you selected.",
same_address: "You must enter two different locations.",
location_not_accessible: "We were unable to plan an accessible trip between those locations.",
location_not_accessible: "We were unable to plan a trip between those locations.",
path_not_found: "We were unable to plan a trip between those locations.",
too_close: "We were unable to plan a trip between those locations.",
unknown: "An unknown error occurred. Please try again, or try a different address.",
Expand Down
3 changes: 2 additions & 1 deletion apps/site/lib/site_web/views/trip_plan_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ defmodule SiteWeb.TripPlanView do
outside_bounds: "We can only plan trips inside the MBTA transitshed.",
no_transit_times: "We were unable to plan a trip at the time you selected.",
same_address: "You must enter two different locations.",
location_not_accessible: "We were unable to plan an accessible trip between those locations.",
location_not_accessible: "We were unable to plan a trip between those locations.",
path_not_found: "We were unable to plan a trip between those locations.",
too_close: "We were unable to plan a trip between those locations.",
unknown: "An unknown error occurred. Please try again, or try a different address.",
Expand All @@ -142,6 +142,7 @@ defmodule SiteWeb.TripPlanView do

@spec show_plan_error?([atom]) :: boolean
def show_plan_error?(errors) do
IO.inspect(errors)
Enum.any?(errors, &Map.has_key?(@plan_errors, &1))
end

Expand Down

0 comments on commit 985019f

Please sign in to comment.