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

add error when we fail to find any connection in matrix #4718

Merged
merged 4 commits into from
May 8, 2024

Conversation

nilsnolde
Copy link
Member

fixes #4715

Comment on lines +248 to +250
if (std::all_of(request.matrix().times().begin(), request.matrix().times().end(),
[](const float& time) { return time == kMaxCost; })) {
throw valhalla_exception_t(442);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put this check in the serializer so there's no additional code needed in every algorithm and/or so we don't have to add extra logic to handle second passes. the code is the same as for /route when no route is found.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to throw in case of expansion action? could still be of use when debugging

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But there’s no info at all if nothing is found, I don’t see how that can be useful?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah sorry, I thought there'd be an actual expansion still in that case

@chrstnbwnkl chrstnbwnkl merged commit 76f316c into master May 8, 2024
7 of 9 checks passed
@chrstnbwnkl chrstnbwnkl deleted the nn-matrix-error branch May 8, 2024 14:30
ADMUKHE pushed a commit to mercedes-benz/valhalla that referenced this pull request Jul 28, 2024
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

Successfully merging this pull request may close these issues.

Null Distance and Time but success=true response
2 participants