Skip to content

Commit

Permalink
don't show missing command hanlder function for global functionserror…
Browse files Browse the repository at this point in the history
… to users
  • Loading branch information
psrvere committed Dec 22, 2024
1 parent b80bb42 commit 40a3fef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/commandhandler/cmd_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"log/slog"

"github.com/dicedb/dice/internal/cmd"
diceerrors "github.com/dicedb/dice/internal/errors"
"github.com/dicedb/dice/internal/ops"
)

Expand Down Expand Up @@ -696,7 +697,8 @@ func validateCmdMeta(c string, meta CmdMeta) error {
switch meta.CmdType {
case Global:
if meta.CmdHandlerFunction == nil {
return fmt.Errorf("global command %s must have CmdHandlerFunction function", c)
slog.Debug("global command %s must have CmdHandlerFunction function", slog.String("command", c))
return diceerrors.ErrInternalServer
}
case MultiShard, AllShard:
if meta.decomposeCommand == nil || meta.composeResponse == nil {
Expand Down

0 comments on commit 40a3fef

Please sign in to comment.