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

0-length paths aren't explicitely forbidden but break most endpoints #9444

Open
eckter opened this issue Oct 24, 2024 · 0 comments · May be fixed by #9931
Open

0-length paths aren't explicitely forbidden but break most endpoints #9444

eckter opened this issue Oct 24, 2024 · 0 comments · May be fixed by #9931
Assignees
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

Comments

@eckter
Copy link
Contributor

eckter commented Oct 24, 2024

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_infra

On which environments the bug occurs?

Local

On which browser the bug occurs?

Firefox

OSRD version (top right corner Account button > Informations)

5977531

@eckter eckter added kind:bug Something isn't working severity:minor Minor severity bug labels Oct 24, 2024
@Castavo Castavo added area:core Work on Core Service area:front Work on Standard OSRD Interface modules area:editoast Work on Editoast Service labels Nov 29, 2024
@Sh099078 Sh099078 self-assigned this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants