Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mattklein123 committed Mar 27, 2017
1 parent f30581e commit 2176c06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/common/redis/command_splitter_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion test/common/redis/command_splitter_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"});
Expand Down

0 comments on commit 2176c06

Please sign in to comment.