diff --git a/nav2_docking/opennav_docking/src/docking_server.cpp b/nav2_docking/opennav_docking/src/docking_server.cpp index 06f63d1a583..dbb9680c4e8 100644 --- a/nav2_docking/opennav_docking/src/docking_server.cpp +++ b/nav2_docking/opennav_docking/src/docking_server.cpp @@ -337,6 +337,7 @@ void DockingServer::dockRobot() } catch (opennav_docking_core::DockingException & e) { result->error_msg = e.what(); RCLCPP_ERROR(get_logger(), result->error_msg.c_str()); + result->error_code = DockRobot::Result::UNKNOWN; } catch (std::exception & e) { result->error_code = DockRobot::Result::UNKNOWN; result->error_msg = e.what(); diff --git a/nav2_docking/opennav_docking/test/test_docking_server.py b/nav2_docking/opennav_docking/test/test_docking_server.py index 9802b15c176..7f7e10be6c5 100644 --- a/nav2_docking/opennav_docking/test/test_docking_server.py +++ b/nav2_docking/opennav_docking/test/test_docking_server.py @@ -136,7 +136,7 @@ def nav_execute_callback(self, goal_handle): result = NavigateToPose.Result() result.error_code = 0 - result.error_msg = "" + result.error_msg = '' return result def test_docking_server(self):