Skip to content
This repository was archived by the owner on Jan 22, 2020. It is now read-only.

Tuna example change_holder function in controller.js trying to make too many responses. #40

Open
mpmckenna8 opened this issue May 25, 2018 · 1 comment

Comments

@mpmckenna8
Copy link

Each time res.json({whatever:stuff}) is called headers are set and a response is sent and then your next call to do that tries to reset the headers on the response and it logs:

Failed to invoke successfully :: Error: Can't set headers after they are sent.

So maybe just generate a json thing and then send it at the end.

https://github.com/hyperledger/education/blob/5c52ec18e15c81f88a008d1ca5e7fb8553c3fac1/LFS171x/fabric-material/tuna-app/controller.js#L449-L469

Will try and make a fix and pull request shortly.

@ciseng
Copy link

ciseng commented Dec 5, 2018

I had this issue. I commented out the res.json on line 454 because the next results check at 460 also adds transaction ID, and tries to send it (res.json calls res.send() as far as I know)

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Development

No branches or pull requests

2 participants