Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(TripPlanner): display backend error message #2243

Merged
merged 7 commits into from
Dec 5, 2024
Merged

Conversation

thecristen
Copy link
Collaborator

@thecristen thecristen commented Dec 3, 2024

Summary of changes

Asana Ticket: Trip Planner returns error messages

Using the recent update from the OpenTripPlannerClient (which is now migrated to the MBTA Github org!), we can now show more detailed error messages in the trip planner. (from the Asana ticket, this is the section "New errors for OTP input errors")

Technically the "Unable to plan your trip" error is located in the wrong spot – it should be where the itineraries display. We can move that in a followup PR after @joshlarson refactors TripPlannerResultsSection from a LiveComponent into a function component as previously discussed.

  • Also fixes showing error messages within the form, as these were broken in both Metro and our own backend 😅
image image image image

@thecristen thecristen requested a review from a team as a code owner December 3, 2024 21:05
@thecristen thecristen added the dev-blue Deploy to dev-blue label Dec 4, 2024
assert str =~ assigns.title
assert str =~ assigns.content

assert rendered_to_string(~H"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit (non-blocking): I think the assertion that would make this section justify its existence would be to somehow assert that there is no title.

@thecristen thecristen removed the dev-blue Deploy to dev-blue label Dec 5, 2024
@thecristen thecristen merged commit 282a294 into main Dec 5, 2024
14 of 20 checks passed
@thecristen thecristen deleted the cbj/otp-errors branch December 5, 2024 20:04
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