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

Timeout when chaincode invoke returns error #81

Open
Romern opened this issue Jul 19, 2020 · 0 comments
Open

Timeout when chaincode invoke returns error #81

Romern opened this issue Jul 19, 2020 · 0 comments

Comments

@Romern
Copy link

Romern commented Jul 19, 2020

I have the following chaincode:

func (s *SmartContract) dummyError(APIstub shim.ChaincodeStubInterface, args []string) sc.Response {
	return shim.Error("TEST")
}

func (s *SmartContract) dummyNotError(APIstub shim.ChaincodeStubInterface, args []string) sc.Response {
	return shim.Success([]byte("TEST"))
}

When I invoke it using

 curl http://localhost:4000/channels/common/chaincodes/mycc -H 'content-type: application/json' -H "Authorization: Bearer XXX" --data '{"fcn":"dummyError", "args":[]}'

The connection times out after a while and I do not get a response, while the second function returns as expected immediatly. It seems that in https://github.com/olegabu/fabric-starter-rest/blob/master/fabric-starter-client.js#L475 the error does not get handled properly. But the error message is also not available at that point (except that there is an error), but that has been already mentioned in Issue #32 .

@Romern Romern changed the title Timeout when chaincode returns Error Timeout when chaincode invoke returns error Jul 19, 2020
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

No branches or pull requests

1 participant