Skip to content

Commit

Permalink
test(scaling): add basic error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mkermani144 committed Apr 14, 2024
1 parent f9629a9 commit bfb3c76
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/scaling/src/node/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ setTimeout(async () => {
for (const message of messages) {
for (const peer of process.env.ALL_PEER_IDS!.split(',')) {
if (peer !== process.env.NODE_PEER_ID!) {
await node.sendMessage(peer, message);
try {
await node.sendMessage(peer, message);
} catch (error) {
console.warn(
`tried to send a message to ${peer.slice(-5)} but failed due to error: ${error}`,
);
}
}
}
}
Expand Down

0 comments on commit bfb3c76

Please sign in to comment.