(bug) Handle malformed _error
values in task result in Orchestrator
#2723
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.
Previously, we assumed that if a task returned with an
_error
key thatit would be a hash and include the
details
key, and that thatdetails
key would also have a hash value. Any of these assumptionsmight be wrong. This amends the Orchestrator transport to handle
_error
values that:message
keydetails
key by setting the detailskey to an empty hash
details
key that is not itself a hash by not tryingto merge our own keys into it.
!bug
Handle malformed
_error
values in task results in OrchestratorBolt now handles
_error
from task results in the Orchestratortransport when the value of the key is not a hash, does not include the
details
key, or thedetails
key is not a hash. Previously Bolt woulderror if any of these conditions was true.