Skip to content

Commit

Permalink
chore(generic_family): Fix bad data format error in the RESTORE comma…
Browse files Browse the repository at this point in the history
…nd (#3501)

* chore(generic_family): Fix bad data format error in the RESTORE command

Signed-off-by: Stepan Bagritsevich <[email protected]>

* chore(generic_family): Remove the error reply for OpStatus::WRONG_TYPE in the RESTORE command, since it is no longer in use

Signed-off-by: Stepan Bagritsevich <[email protected]>

---------

Signed-off-by: Stepan Bagritsevich <[email protected]>
  • Loading branch information
BagritsevichStepan authored Aug 12, 2024
1 parent 634b08d commit 930a496
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/server/generic_family.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1211,17 +1211,12 @@ void GenericFamily::Restore(CmdArgList args, ConnectionContext* cntx) {
if (result.value()) {
return cntx->SendOk();
} else {
return cntx->SendError("Bad data formatasdfasdf");
return cntx->SendError("Bad data format");
}
} else if (result.status() == OpStatus::KEY_EXISTS) {
return cntx->SendError("BUSYKEY: key name already exists.");
} else {
switch (result.status()) {
case OpStatus::KEY_EXISTS:
return cntx->SendError("BUSYKEY: key name already exists.");
case OpStatus::WRONG_TYPE:
return cntx->SendError("Bad data format");
default:
return cntx->SendError(result.status());
}
return cntx->SendError(result.status());
}
}

Expand Down

0 comments on commit 930a496

Please sign in to comment.