convector icon indicating copy to clipboard operation
convector copied to clipboard

Add details to model failure exception message

Open walmon opened this issue 6 years ago • 0 comments

The developer may get this error an exception like this when sending a proposal:

myapp: error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: error executing chaincode: transaction returned with failure: {"name":"Error","status":500,"message":"Model io.worldsibu.car is not complete\n{\"type\":\"io.worldsibu.car\",\"make\":\"Volkswagen\",\"model\":\"Jetta\",\"colour\":\"gray\",\"owner\":\"Walter Montes\"}"}

It is not obvious that the hidden property id is missing. The exception message at convector-core-model/dist/src/convector-model.js:131:35 should include a label like "Maybe you forgot to include the 'id' property."

walmon avatar Jan 02 '19 12:01 walmon