diff --git a/mgmt2/rpc/jsonrpc/error/RPCError.cc b/mgmt2/rpc/jsonrpc/error/RPCError.cc index 8cbe96f497e..6cbb10b870d 100644 --- a/mgmt2/rpc/jsonrpc/error/RPCError.cc +++ b/mgmt2/rpc/jsonrpc/error/RPCError.cc @@ -21,7 +21,7 @@ #include "RPCError.h" #include -#include // TODO: remove +#include namespace { // anonymous namespace @@ -66,7 +66,7 @@ RPCErrorCategory::message(int ev) const return {"Missing method field"}; // params case RPCErrorCode::InvalidParamType: - return {"Invalid params type, should be a structure"}; + return {"Invalid params type. A Structured value is expected"}; // id case RPCErrorCode::InvalidIdType: return {"Invalid id type"}; @@ -90,4 +90,4 @@ make_error_code(rpc::error::RPCErrorCode e) return {static_cast(e), rpcErrorCategory}; } -} // namespace rpc::error \ No newline at end of file +} // namespace rpc::error diff --git a/mgmt2/rpc/jsonrpc/unit_tests/test_basic_protocol.cc b/mgmt2/rpc/jsonrpc/unit_tests/test_basic_protocol.cc index 543394b23a4..ffe272a2d9c 100644 --- a/mgmt2/rpc/jsonrpc/unit_tests/test_basic_protocol.cc +++ b/mgmt2/rpc/jsonrpc/unit_tests/test_basic_protocol.cc @@ -302,7 +302,7 @@ TEST_CASE("Invalid parameters base on the jsonrpc 2.0 protocol", "[protocol]") REQUIRE(resp); const std::string_view expected = - R"({"jsonrpc": "2.0", "error": {"code": 6, "message": "Invalid params type, should be a structure"}, "id": "13"})"; + R"({"jsonrpc": "2.0", "error": {"code": 6, "message": "Invalid params type. A Structured value is expected"}, "id": "13"})"; REQUIRE(*resp == expected); } }