server: perform_move: throw when message not found

Warning & continuing is not the right thing...
This commit is contained in:
Dirk-Jan C. Binnema
2023-12-31 07:49:56 +02:00
parent 1999d9e6ef
commit bae290e718

View File

@ -831,7 +831,7 @@ Server::Private::perform_move(Store::Id docid,
for (auto& [id,path]: id_paths) { for (auto& [id,path]: id_paths) {
auto idmsg{store().find_message(id)}; auto idmsg{store().find_message(id)};
if (!idmsg) if (!idmsg)
mu_warning("failed to find message for id {}", id); throw Error{Error::Code::Xapian, "cannot find message for id {}", id};
auto sexpstr = "(:update " + msg_sexp_str(*idmsg, id, {}); auto sexpstr = "(:update " + msg_sexp_str(*idmsg, id, {});
/* note, the :move t thing is a hint to the frontend that it /* note, the :move t thing is a hint to the frontend that it