chore: provide basic logging to catch possible command errors (#3213)

* chore: provide basic logging to catch possible command errors

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-06-26 14:21:05 +03:00 committed by GitHub
parent 1dfb604d97
commit 55e445b511
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 115 additions and 82 deletions

View file

@ -146,7 +146,7 @@ void ScriptMgr::LoadCmd(CmdArgList args, ConnectionContext* cntx) {
auto res = Insert(body, interpreter);
if (!res)
return rb->SendError(res.error().Format());
return cntx->SendError(res.error().Format());
// Schedule empty callback inorder to journal command via transaction framework.
cntx->transaction->ScheduleSingleHop([](auto* t, auto* shard) { return OpStatus::OK; });