hyperledger / fabric-chaincode-java

Hyperledger Fabric Contract and Chaincode implementation for Java
https://hyperledger.github.io/fabric-chaincode-java/
Apache License 2.0
304 stars 207 forks source link

Revert "add cause message to ContractRuntimeException message" #217

Closed jt-nti closed 2 years ago

jt-nti commented 2 years ago

This reverts commit 16f6a6fe65cef59be8e9481e0e42574901f96cbb.

The ContractRuntimeException intentionally doesn't report any details back to the client for security reasons.

Signed-off-by: James Taylor jamest@uk.ibm.com

jt-nti commented 2 years ago

Sorry I didn't get a chance to review #216 before it was merged. I'll reopen #214 to find out what's happening and whether there are alternative solutions.

kopaygorodsky commented 2 years ago

Currently, there is no way to see the error message that a peer returned during simulation. It says Unsuccessful response received and nothing else, payload is ignored.

jt-nti commented 2 years ago

Hi @kopaygorodsky, the payload is a known issue with errors but, unless I've misunderstood what you're trying to do, it should be possible to see the error message as demonstrated by the asset transfer samples.

Could you add a bit more information and perhaps some code to recreate the problem to issue #214 please?

Thanks, James