Simplify Java client error-handling example #1262
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.
The latest fabric-gateway client API release (v1.7.0) includes the gRPC error details in the GatewayExcetion stack trace so it is not necessary to programmatically access them to demonstrate that they are present.
This change updates the asset-transfer-basic/application-gateway-java sample to simplify the updateNonExistentAsset example method. It also:
The additional testing of running the Java client applications using first Gradle and then Maven identified an inconsistency in behaviour between the Java implementation of the asset-transfer-basic smart contract and all the other language implementations. In only the Java implementation, the InitLedger call failed if the assets already existed, which meant that the sample client applications could only be run once. A subsequent run (without clearing the ledger) resulted in an endorsement failure on the InitLedger call. This change fixes that behaviour and makes the Java implementation consistent with the other language implementations.
Closes #747