diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp
index 2f08fa6a89f61c..36cd8b785ac4f1 100644
--- a/examples/chip-tool/commands/tests/TestCommand.cpp
+++ b/examples/chip-tool/commands/tests/TestCommand.cpp
@@ -53,7 +53,7 @@ void TestCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHI
     auto * command = static_cast<TestCommand *>(context);
     VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "Test command context is null"));
 
-    LogErrorOnFailure(command->ContinueOnChipMainThread(CHIP_NO_ERROR));
+    LogErrorOnFailure(command->ContinueOnChipMainThread(error));
 }
 
 void TestCommand::Exit(std::string message)