Skip to content

fix: Don't crash the timetable page when the shuttle route isn't available#3221

Merged
joshlarson merged 2 commits into
mainfrom
jdl/fix/dont-crash-timetable-when-shuttle-route-isnt-available
May 29, 2026
Merged

fix: Don't crash the timetable page when the shuttle route isn't available#3221
joshlarson merged 2 commits into
mainfrom
jdl/fix/dont-crash-timetable-when-shuttle-route-isnt-available

Conversation

@joshlarson
Copy link
Copy Markdown
Contributor

Scope

This should fix the fact that the Providence timetable on dev is unable to load right now.

Implementation

  • Replace @routes_repo.get(shuttle_route_id) with a skeleton %Route{id: shuttle_route_id, type: 3}. We don't need any info about the shuttle route other than its route ID - the schedule query happens elsewhere (and gracefully handles a missing route).

Screenshots

Screenshot 2026-05-29 at 3 43 00 PM

How to test

  • Clear your cache (Dotcom.Cache.Multilevel.flush in an IEx shell), and then look at the Providence timetable using dev or prod data.
  • On this branch, it will load exactly what you'd expect
  • On main, it'll crash

@joshlarson joshlarson requested a review from a team as a code owner May 29, 2026 19:57
@joshlarson joshlarson requested a review from lvachon1 May 29, 2026 19:57
Comment thread lib/dotcom_web/controllers/schedule/timetable_controller.ex
@joshlarson joshlarson enabled auto-merge (squash) May 29, 2026 20:21
@joshlarson joshlarson merged commit ee43f8f into main May 29, 2026
30 of 31 checks passed
@joshlarson joshlarson deleted the jdl/fix/dont-crash-timetable-when-shuttle-route-isnt-available branch May 29, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants