From 2176c065efffdf0fe1cb363804d12e444312600f Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Mon, 27 Mar 2017 14:13:07 -0700 Subject: [PATCH] comment --- source/common/redis/command_splitter_impl.cc | 3 ++- test/common/redis/command_splitter_impl_test.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/common/redis/command_splitter_impl.cc b/source/common/redis/command_splitter_impl.cc index 414dcd8e47c1..72902c2fed42 100644 --- a/source/common/redis/command_splitter_impl.cc +++ b/source/common/redis/command_splitter_impl.cc @@ -157,7 +157,8 @@ SplitRequestPtr InstanceImpl::makeRequest(const RespValue& request, SplitCallbac auto handler = command_map_.find(request.asArray()[0].asString()); if (handler == command_map_.end()) { - callbacks.onResponse(Utility::makeError("unsupported command")); + callbacks.onResponse(Utility::makeError( + fmt::format("unsupported command '{}'", request.asArray()[0].asString()))); return nullptr; } diff --git a/test/common/redis/command_splitter_impl_test.cc b/test/common/redis/command_splitter_impl_test.cc index 5490e299da07..74841023921e 100644 --- a/test/common/redis/command_splitter_impl_test.cc +++ b/test/common/redis/command_splitter_impl_test.cc @@ -67,7 +67,7 @@ TEST_F(RedisCommandSplitterImplTest, InvalidRequestArrayNotStrings) { TEST_F(RedisCommandSplitterImplTest, UnsupportedCommand) { RespValue response; response.type(RespType::Error); - response.asString() = "unsupported command"; + response.asString() = "unsupported command 'newcommand'"; EXPECT_CALL(callbacks_, onResponse_(PointeesEq(&response))); RespValue request; makeBulkStringArray(request, {"newcommand", "hello"});