Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #4180 peer chaincode error message formatting #4237

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

neonbhai
Copy link

Type of change

Description

Uses proto.MarshalTextString to insert the protocol buffer response message into the error string

Uses proto.MarshalTextString to insert the protocol buffer response message into the error string
@neonbhai neonbhai requested a review from a team as a code owner May 27, 2023 23:25
@denyeart
Copy link
Contributor

denyeart commented May 28, 2023

Thanks!

You'll also need to fix the tests to match the new behavior.

For example this unit test failure:

--- FAIL: TestQueryCmdEndorsementFailure (0.00s)
    query_test.go:83: 
        	Error Trace:	/home/runner/work/fabric/fabric/internal/peer/chaincode/query_test.go:83
        	Error:      	Expect "endorsement failure during query. response: status: 502
        	            	payload: "Invalid function name"
        	            	" to match "response: status:502 payload:"Invalid function name""
        	Test:       	TestQueryCmdEndorsementFailure

And the integration test failures mentioned at:
https://github.com/hyperledger/fabric/actions/runs/5101262745/jobs/9176002988?pr=4237

@denyeart
Copy link
Contributor

You'll also need to sign the commit, see:
https://github.com/hyperledger/fabric/pull/4237/checks?check_run_id=13810904684

Fix error message unit test.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

peer chaincode query cli error message formatting
2 participants