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

Improve error handling in Transmodel API #6259

Open
t2gran opened this issue Nov 18, 2024 · 0 comments
Open

Improve error handling in Transmodel API #6259

t2gran opened this issue Nov 18, 2024 · 0 comments
Assignees
Labels

Comments

@t2gran
Copy link
Member

t2gran commented Nov 18, 2024

Is your feature request related to a problem? Please describe.

We want a clear user-friendly error message following the GraphQL error structure to be returned to the client when invalid data is submitted. We do not want to log this on the server side.

Here is an example:

  trip(
    from:{
       name:"Bjerkealleen5A,Skedsmo",
       coordinates:{ latitude:59.96050414081307, longitude:11.040338686322317 }
    }
    to:{
       place:"NSR:StopPlace:385",
       name:"Alna,Oslo"
    }
    dateTime:"2024-11-15T12:03:55.232+00:00"
    modes:{ directMode:foot }
    via:{
       visit:{
          stopLocationIds:""
        }
     }
  ) {
    tripPatterns{
      expectedStartTime
      duration
      distance
      legs{
         mode
         distance
         line{
            id
            publicCode
         }
     }
  }

Describe the solution you'd like
We want this both when the validation happens in the GraphQL request mapping layer and for semantic validation in the OTP domain logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant