1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

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

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);
}