chore(zset): add additional logs for parse errors

This commit is contained in:
Roman Gershman 2022-06-14 22:45:01 +03:00
parent c23dc1c94c
commit ebd0d89dba
1 changed files with 2 additions and 0 deletions

View File

@ -956,6 +956,7 @@ void ZSetFamily::ZAdd(CmdArgList args, ConnectionContext* cntx) {
double val = 0;
if (!ParseScore(cur_arg, &val)) {
VLOG(1) << "Bad score:" << cur_arg << "|";
return (*cntx)->SendError(kInvalidFloatErr);
}
if (isnan(val)) {
@ -1049,6 +1050,7 @@ void ZSetFamily::ZIncrBy(CmdArgList args, ConnectionContext* cntx) {
scored_member.second = ArgS(args, 3);
if (!absl::SimpleAtod(score_arg, &scored_member.first)) {
VLOG(1) << "Bad score:" << score_arg << "|";
return (*cntx)->SendError(kInvalidFloatErr);
}