Skip to content

Improve error feedback / validation of segments argument in viaTrip query #5053

@testower

Description

@testower

When making a viaTrip query, any exceptions that occur while building the RouteViaRequest lead to a very generic SYSTEM_ERROR, that doesn't give the consumer any hints as to what is wrong with the query.

For example, segments "must have length of exactly one greater than the via field", but if one sends a segments array that is shorter than the required length, it will result in an IndexOutOfBoundsException here.

It is then caught here, resulting in a not very useful output.

I don't know if there are more cases of exceptions / errors due to invalid input, but if so, this issue could serve to apply a general solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnturOn Entur RoadmapStaleThis issue is stale, no activity for 90 days. Remove stale label or comment within 30 days.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions