I'm encountering an error when i try to update two assets that are related to the same asset. I'm getting the error after the upgrade from HL Composer v0.18.1 to v0.19.4.
Here the models:
asset Order identified by pullID {
o String pullID
--> PackCase caseNumber optional
}
asset PackCase identified by caseNumber{
o String caseNumber
--> Order[] orders optional
}
I want to associate Order1 and Order2 to Packcase1. To do this i use this method in transaction processor, which insert the order into the packcase.orders array and update the reference of order.casenumber simmultaneously:
function AssociatePackCaseToOrder(tx){
tx.order.caseNumber = tx.packCase;
tx.packCase.orders.push(tx.order);
return getAssetRegistry(namespaceAsset+'.Order')
.then(function(ordersRegistry){
return ordersRegistry.update(tx.order)
.then(function(){
console.info("Order Updated");
return getAssetRegistry(namespaceAsset+'.PackCase')
.then(function(packCaseRegistry){
return packCaseRegistry.update(tx.packCase)
.then(function(){
console.info("PackCase Updated");
})
})
})
})
}
But when i try to invoke this method two times sequentially i get this error:
Error trying invoke business network. Error: No valid responses from any peers.\nResponse from attempted peer comms was an error:
Error: 8 RESOURCE_EXHAUSTED: received trailing metadata size exceeds limit",
"stack":"Error: Error trying invoke business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 8 RESOURCE_EXHAUSTED: received trailing metadata size exceeds limit
at _initializeChannel.then.then.then.then.catch (/usr/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:967:34)
at <anonymous>
Does anyone know what could be the reason of the error?