From 5e402e1a524843ea3a7eb31bd3bfa21ba6ed3e53 Mon Sep 17 00:00:00 2001 From: Zvonimir Sculac Date: Tue, 1 Oct 2024 17:07:35 +0200 Subject: [PATCH] Extend logs for publish --- src/commands/protocols/common/find-nodes-command.js | 2 +- src/commands/protocols/common/protocol-message-command.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/commands/protocols/common/find-nodes-command.js b/src/commands/protocols/common/find-nodes-command.js index f11691fbd..268542d63 100644 --- a/src/commands/protocols/common/find-nodes-command.js +++ b/src/commands/protocols/common/find-nodes-command.js @@ -60,7 +60,7 @@ class FindNodesCommand extends Command { await this.handleError( operationId, blockchain, - `Unable to find enough nodes for operationId: ${operationId}, keyword: ${keyword}. Minimum number of nodes required: ${minAckResponses}`, + `Unable to find enough nodes for operationId: ${operationId}, keyword: ${keyword}. Minimum number of nodes required: ${minAckResponses}, number of nodes found: ${closestNodes.length}`, this.errorType, true, ); diff --git a/src/commands/protocols/common/protocol-message-command.js b/src/commands/protocols/common/protocol-message-command.js index b0ee5c48b..b0c2852fb 100644 --- a/src/commands/protocols/common/protocol-message-command.js +++ b/src/commands/protocols/common/protocol-message-command.js @@ -30,6 +30,10 @@ class ProtocolMessageCommand extends Command { const keywordUuid = uuidv5(keyword, uuidv5.URL); + this.logger.debug( + `Sending protocol message with operation id: ${operationId}, keyword uuidv5: ${keywordUuid}`, + ); + const response = await this.networkModuleManager.sendMessage( node.protocol, node.id, @@ -52,7 +56,7 @@ class ProtocolMessageCommand extends Command { default: await this.markResponseAsFailed( command, - `Received unknown message type from node during ${command.name}`, + `Received unknown message type from node during ${command.name}. Unknown message type: ${response.header.messageType}`, ); return Command.empty(); }