[#709] Fix error handling in morley-client
Description
Problem: There's a bug in handleOperationResult
that might throw away
useful information about the error reason.
Solution: Rewrite it. Also remove redundant combineResults
. The trick
is to collect all RunError
s and AppliedResult
s in the first pass,
making note of whether we encountered OperationFailed
at least once.
If we did, handle the list of RunError
s. If we didn't, return the
list of AppliedResult
s. This is somewhat complicated by the fact that
we merge AppliedResult
s within one operation, but not between
operations.
Related issue(s)
Resolves #709 (closed), supersedes !1086 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.