Skip to content
Snippets Groups Projects
Commit 25017212 authored by Javier Diaz's avatar Javier Diaz
Browse files

Updated the way the dlt_gateway handles chaincode responses

parent 19cc0f7c
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!259Resolve "(CTTC) Replace DLT Gateway functionality with an opensource and Hyper Ledger v2.4+ compliant version"
...@@ -100,7 +100,7 @@ async function getFromDlt(call, callback) { ...@@ -100,7 +100,7 @@ async function getFromDlt(call, callback) {
const result = JSON.parse(resultJson); const result = JSON.parse(resultJson);
// Send the response with the formatted JSON data // Send the response with the formatted JSON data
callback(null, { record_id: call.request, data_json: JSON.stringify(result) }); callback(null, { record_id: call.request, operation: result.operation, data_json: result.data_json });
} catch (error) { } catch (error) {
if (error.message.includes("data not found for key")) { if (error.message.includes("data not found for key")) {
// Return an empty response when no record is found // Return an empty response when no record is found
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment