Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mgmt2/rpc/jsonrpc/error/RPCError.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "RPCError.h"

#include <string>
#include <system_error> // TODO: remove
#include <system_error>

namespace
{ // anonymous namespace
Expand Down Expand Up @@ -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"};
Expand All @@ -90,4 +90,4 @@ make_error_code(rpc::error::RPCErrorCode e)
return {static_cast<int>(e), rpcErrorCategory};
}

} // namespace rpc::error
} // namespace rpc::error
2 changes: 1 addition & 1 deletion mgmt2/rpc/jsonrpc/unit_tests/test_basic_protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down