Skip to content

Conversation

@majiayu000
Copy link

Fixes #764

Changes

  • Distinguish between hooks and channels when checking RENAME restrictions
  • Return "key has channels set" error when channels are present (instead of incorrectly saying "key has hooks set")
  • Added errKeyHasChannelsSet error in token.go
  • Updated tests to verify correct error message

The RENAME command was incorrectly returning "key has hooks set" when
a channel (not a hook) was associated with the key. This fix:

- Adds a new error errKeyHasChannelsSet for channel-specific errors
- Updates RENAME logic to check for hooks and channels separately
- Returns the appropriate error message based on what's blocking the rename
- Updates tests to expect "key has channels set" when channels are present

Fixes tidwall#764

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: majiayu000 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

key rename not working

1 participant