diff --git a/src/script.c b/src/script.c index dfbca9511..cc785705f 100644 --- a/src/script.c +++ b/src/script.c @@ -406,7 +406,7 @@ static int scriptVerifyWriteCommandAllow(scriptRunCtx *run_ctx, char **err) { if (run_ctx->flags & SCRIPT_READ_ONLY && (run_ctx->c->cmd->flags & (CMD_WRITE|CMD_MAY_REPLICATE))) { - *err = sdsnew("Write commands are not allowed from read-only scripts."); + *err = sdsnew("Write commands are not allowed from read-only scripts"); return C_ERR; } diff --git a/src/script_lua.c b/src/script_lua.c index 2e8220743..0ec40ecfa 100644 --- a/src/script_lua.c +++ b/src/script_lua.c @@ -1676,7 +1676,7 @@ void luaCallFunction(scriptRunCtx* run_ctx, lua_State *lua, robj** keys, size_t final_msg = sdscatfmt(final_msg, "-%s", err_info.msg); if (err_info.line && err_info.source) { - final_msg = sdscatfmt(final_msg, " script: %s, on %s:%s.", + final_msg = sdscatfmt(final_msg, ". script: %s, on %s:%s.", run_ctx->funcname, err_info.source, err_info.line); diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl index 921cc2ada..f8ccc0c7f 100644 --- a/tests/unit/scripting.tcl +++ b/tests/unit/scripting.tcl @@ -2359,7 +2359,7 @@ start_server {tags {"scripting"}} { assert_equal [ r eval_ro { local t = redis.pcall('set','x','y') - if t['err'] == "ERR Write commands are not allowed from read-only scripts." then + if t['err'] == "ERR Write commands are not allowed from read-only scripts" then return 1 else return 0