-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track command - use types for error handling instead of grpc statuses…
… [KVL-1005] (#10503) * Track command response using an Either instead of passing the completion with the grpc code. This makes it clearer as to the result of command tracking. We no longer count on the grpc status to determine if there was an error or not, and instead use types for that. CHANGELOG_BEGIN akka-bindings: `LedgerClientBinding.commands` now returns a flow of `Either[CompletionFailure, CompletionSuccess]` instead of `Completion` for clearer error handling. For backwards compatiblity the new return type can be turned back into a `Completion` using `CompletionResponse.toCompletion` CHANGELOG_END * Fix formatting * Code review changes - remove usages of Symbol in tests - clean curly braces * Remove change added from another PR * Fix import * Fix import * Fix retry flow and extract one more match case * Un-nest matches to a single level for simplicity * fix typo Co-authored-by: Samir Talwar <[email protected]> * Be consistent in assertions and prefer `inside` for pattern matching * Inline CompletionResponse to use the full type * Use simpler matcher * Formatting * Add a way to convert back an `Either[CompletionFailure, CompletionSuccess]` to a `Completion` for backwards compatibility. This simplifies update for systems that are tightly coupled to `Completion` * Add test for converting to/from CompletionResponse * Remove unnecessary brackets * Add missing header * Use checked exceptions to preserve backwards compatiblity * Fix unapply Co-authored-by: Samir Talwar <[email protected]>
- Loading branch information
1 parent
93c25f3
commit ee34d0f
Showing
21 changed files
with
508 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.