diff --git a/src/dlt/gateway/dltApp/src/dltGateway.js b/src/dlt/gateway/dltApp/src/dltGateway.js index 7ee723e7c2ca64281d34eb141c2db509ae3c7cb4..80eeebc1775dbc794a27ac26a035ab35538b90bd 100644 --- a/src/dlt/gateway/dltApp/src/dltGateway.js +++ b/src/dlt/gateway/dltApp/src/dltGateway.js @@ -101,7 +101,8 @@ async function getFromDlt(call, callback) { // Send the response with the formatted JSON data callback(null, { record_id: call.request, data_json: JSON.stringify(result) }); - } catch (error) { if (error.message.includes("data not found for key")) { + } catch (error) { + if (error.message.includes("data not found for key")) { // Return an empty response when no record is found callback(null, { record_id: call.request, data_json: "{}" }); } else { @@ -110,6 +111,7 @@ async function getFromDlt(call, callback) { code: grpc.status.UNKNOWN, details: error.message }); + } } }