Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSET return no suck key instread of NotFound when key not exist #1557

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

enjoy-binbin
Copy link
Member

The current code directly returns s.ToString() in
this case:

127.0.0.1:6666> lset nokey 0 1
(error) ERR NotFound:

NotFound might not be that friendly, and there's an
extra : after it. Modify it to return no such key:

127.0.0.1:6666> lset nokey 0 1
(error) ERR no such key

Note Redis also return the no such key error in this
case, so it should be fine returning this error.

The current code directly returns s.ToString() in
this case:
```
127.0.0.1:6666> lset nokey 0 1
(error) ERR NotFound:
```

NotFound might not be that friendly, and there's an
extra `:` after it. Modify it to return no such key:
```
127.0.0.1:6666> lset nokey 0 1
(error) ERR no such key
```

Note Redis also return the no such key error in this
case, so it should be fine returning this error.
@git-hulk git-hulk merged commit 80913bc into apache:unstable Jul 6, 2023
@enjoy-binbin enjoy-binbin deleted the lset_no_key branch July 6, 2023 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants