0-length paths aren't explicitely forbidden but break most endpoints #9444
Labels
area:core
Work on Core Service
area:editoast
Work on Editoast Service
area:front
Work on Standard OSRD Interface modules
kind:bug
Something isn't working
severity:minor
Minor severity bug
What happened?
Nothing in the API or UI forbids the user from creating a path with overlapping origin and destination, resulting in a 0-length path.
Surprisingly, the pathfinding endpoint gives a valid result. But any subsequent call (path_properties or simulation) result in a 500.
I don't think it's a significant issue. But if we want to handle that case properly, we could add an error case in the pathfinding endpoint.
What did you expect to happen?
I expected it to fail right away at the pathfinding endpoint.
I think we should either fail with a 4xx at the pathfinding endpoint, or handle it all the way (but let's not do that).
How can we reproduce it (as minimally and precisely as possible)?
Rocket tool, pick any OP, then ask for a path like
MES MES
on small_infraOn which environments the bug occurs?
Local
On which browser the bug occurs?
Firefox
OSRD version (top right corner
Account
button >Informations
)5977531
The text was updated successfully, but these errors were encountered: