-
Notifications
You must be signed in to change notification settings - Fork 532
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
Do not overwrite the error code in planWithSinglePipeline #2723
Conversation
Should I write a note about this change in MIGRATION.md? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be possible that generatePlan returns false without properly setting the error_code. What do you think about only overwritting the error code if it is SUCCESS or UNDEFINED? That way nothing is overwritten + we're not ignoring an error
I did the changes to consider the case the This appears to me to be an API design issue since the failure-or-success piece of information must be set at two places. |
Return the `MotionPlanResponse` as-is. Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
Do not rely on generatePlan() to set the error code in all cases and ensure that the error code is set to FAILURE if `generatePlan()` returns false. Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
34ef68d
to
92ae93e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2723 +/- ##
==========================================
- Coverage 50.74% 42.99% -7.75%
==========================================
Files 392 692 +300
Lines 32553 56325 +23772
Branches 0 7273 +7273
==========================================
+ Hits 16517 24211 +7694
- Misses 16036 31951 +15915
- Partials 0 163 +163 ☔ View full report in Codecov by Sentry. |
Thank you! You're right, maybe this could be updated to return the response in the future to avoid duplicate error codes |
Return the
MotionPlanResponse
as-is, also in case of error.Description
The error code was forced-set to
FAILURE
in case of error, preventing the caller to get the correct information in case of error.Checklist