Skip to content

Commit

Permalink
Expose the actual unsupported commands in errors
Browse files Browse the repository at this point in the history
  • Loading branch information
agis committed May 20, 2019
1 parent adf3650 commit fa45217
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func (s *Server) Handle(ctx context.Context, conn net.Conn) {
case "GETNAME":
writeErr = writer.WriteBulkString(c.id)
default:
writeErr = writer.WriteError("CONS Command not supported")
writeErr = writer.WriteError("Command not supported: " + subcmd)
}
case "QUIT":
writer.WriteBulkString("OK")
Expand All @@ -320,7 +320,7 @@ func (s *Server) Handle(ctx context.Context, conn net.Conn) {
case "PING":
writeErr = writer.WriteSimpleString("PONG")
default:
writeErr = writer.WriteError("Command not supported")
writeErr = writer.WriteError("Command not supported: " + cmd)
}
}
if parseErr != nil || command.IsLast() {
Expand Down

0 comments on commit fa45217

Please sign in to comment.