Fix discovery dispatch accumulating errors #3272
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The
dispatch
function was failing in some circumstances if the 1st command failed but the 2nd worked.I saw this behaviour running the
hana-scale-up-cost-opt
photofinish scenario.In reality, we don't have any flagrant error, as by coincidence the correct command is the 2nd and last, so the commands are properly dispatched to the domain code. The failure was that we were returning 500 error in the collect endpoint (and we had more SAP instances in the payload, they wouldn't be handled).
This was the error log in web:
How was this tested?
UT