Commit 25017212 authored by Javier Diaz's avatar Javier Diaz
Browse files

Updated the way the dlt_gateway handles chaincode responses

parent 19cc0f7c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ async function getFromDlt(call, callback) {
    const result = JSON.parse(resultJson);

    // 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) {   
   if (error.message.includes("data not found for key")) {
    // Return an empty response when no record is found