Skip to content

Add new routing errors for cases where all itineraries were filtered by post-processing - #3628

Merged
hannesj merged 23 commits into
opentripplanner:dev-2.xfrom
entur:otp2_improve_errors
Nov 9, 2021
Merged

hannesj merged 23 commits into
opentripplanner:dev-2.xfrom
entur:otp2_improve_errors

Conversation

@hannesj

@hannesj hannesj commented Sep 29, 2021

Copy link
Copy Markdown
Contributor

Summary

Add new errors describing why no itineraries were found and expose them through new field in Transmodel GraphQL API.

This also re-adds the routing errors which were lost in the migration from OTP1 to OTP2

Documentation

New descriptions were written for the GraphQL API.

Changelog

Was a bullet point added to the changelog file with description and link to the linked issue?

@hannesj
hannesj requested a review from a team as a code owner September 29, 2021 17:51
@hannesj
hannesj force-pushed the otp2_improve_errors branch from 7a4b912 to f605cdf Compare September 29, 2021 18:00
@hannesj hannesj added the !Improvement A functional improvement or micro feature label Sep 29, 2021
@hannesj hannesj added this to the 2.1 milestone Sep 29, 2021
@hannesj
hannesj force-pushed the otp2_improve_errors branch from c3d7c0a to 7b4a886 Compare September 30, 2021 10:18
Comment thread src/main/java/org/opentripplanner/routing/core/RoutingContext.java Outdated
Comment thread src/ext/java/org/opentripplanner/ext/transmodelapi/model/EnumTypes.java Outdated
@hannesj
hannesj force-pushed the otp2_improve_errors branch from 7b4a886 to fe24929 Compare September 30, 2021 18:15
Comment thread src/main/java/org/opentripplanner/routing/api/response/RoutingErrorCode.java Outdated
Comment thread src/ext/java/org/opentripplanner/ext/transmodelapi/model/EnumTypes.java Outdated
@hannesj
hannesj force-pushed the otp2_improve_errors branch from fe24929 to a4a07bf Compare October 5, 2021 11:25
@hannesj
hannesj force-pushed the otp2_improve_errors branch from ac9abd9 to 152494d Compare October 7, 2021 10:16
@hannesj hannesj added the Entur Test This is currently being tested at Entur label Oct 7, 2021
Comment thread src/ext/java/org/opentripplanner/ext/transmodelapi/model/EnumTypes.java Outdated
Comment thread src/ext/java/org/opentripplanner/ext/transmodelapi/model/EnumTypes.java Outdated
@hannesj
hannesj force-pushed the otp2_improve_errors branch 2 times, most recently from 17b79a1 to 02ad892 Compare October 8, 2021 09:38
@t2gran

t2gran commented Oct 8, 2021

Copy link
Copy Markdown
Member

Should we keep this as a "draft" until the filter chain is merged?

Co-authored-by: Thomas Gran <t2gran@gmail.com>
@hannesj

hannesj commented Oct 26, 2021

Copy link
Copy Markdown
Contributor Author

Fixes #3672

@hannesj

hannesj commented Oct 26, 2021

Copy link
Copy Markdown
Contributor Author

Fixes #3676

Comment thread docs/Changelog.md Outdated
Co-authored-by: Thomas Gran <t2gran@gmail.com>
t2gran
t2gran previously approved these changes Nov 2, 2021

@flaktack flaktack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've tested this and all errors were returned as expected on the REST API, save for WALKING_BETTER_THAN_TRANSIT.

abyrd
abyrd previously approved these changes Nov 4, 2021
Comment thread src/main/java/org/opentripplanner/routing/core/RoutingContext.java Outdated

@flaktack flaktack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The errors are now uniformly present 🥳, thanks!

Predicate<Vertex> isNotConnected = isFrom ^ opt.arriveBy
? hasNoOutgoing
: hasNoIncoming;
Predicate<Vertex> isNotConnected = (isFrom == opt.arriveBy) ? hasNoIncoming : hasNoOutgoing;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I love the readability of this simple substitution.

@hannesj
hannesj merged commit b4759c3 into opentripplanner:dev-2.x Nov 9, 2021
@hannesj
hannesj deleted the otp2_improve_errors branch November 9, 2021 10:38
t2gran pushed a commit that referenced this pull request Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Entur Test This is currently being tested at Entur !Improvement A functional improvement or micro feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants