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

Invalid GraphQL query results in error when planning trip #1131

Open
brodyFlannigan opened this issue Feb 4, 2024 · 1 comment
Open

Invalid GraphQL query results in error when planning trip #1131

brodyFlannigan opened this issue Feb 4, 2024 · 1 comment

Comments

@brodyFlannigan
Copy link

Hi!

I'm encountering an issue with trip planning using OTP-RR.

I'm running OTP 2.4.0 and the latest version of OTP-RR (commit e004d3b)

The issue I'm having is that it seems that when planning a trip, the query sent to the OTP server is invalid.

Specifically, GraphQL doesn't like being asked for numberOfTransfers and returns the following error in it's response.

{
    "errors": [
        {
            "message": "Validation error (FieldUndefined@[plan/itineraries/numberOfTransfers]) : Field 'numberOfTransfers' in type 'Itinerary' is undefined",
            "locations": [
                {
                    "line": 227,
                    "column": 7
                }
            ],
            "extensions": {
                "classification": "ValidationError"
            }
        }
    ]
}

Using the GraphQL debugging UI (GraphiQL) on the OTP server, I've determined that removing line 227 from the GraphQL query results in a trip plan being returned.

Additionally, when this error is returned by the OTP server, no indication is provided to the user that something went wrong. They're just presented with a blank list of trip plan results.

@miles-grant-ibigroup
Copy link
Collaborator

Yep, there is a breaking change in OTP that caused our front-end to not work with older versions. Frustrating! We should have better error handling, we've been wanting to do that for a while. We welcome PRs!

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

No branches or pull requests

2 participants