chore: finish the vocabulary sweep — KV_ERROR, not REDIS_ERROR

Last of our own naming to move. The error-code fixture in the wrapping test (and
the README example that mirrors it) still said REDIS_ERROR.

What intentionally remains, and why:
  RediSearch  — names a specific external module that the FT.* commands map to.
                It is an address, not our vocabulary.
  StoreDist   — matches a case-insensitive search for "redis" by accident
                (sto-reDis-t). Not the word.
  RELEASE-NOTES.md — a changelog of what upstream shipped. Rewriting history to
                pretend it used our names would make it wrong.
This commit is contained in:
2026-07-26 08:38:14 -07:00
parent 6994cf05aa
commit f3f6f4cb81
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -477,7 +477,7 @@ func (h MyHook) ProcessHook(next kv.ProcessHook) kv.ProcessHook {
if err != nil {
// Wrap with custom error type
wrappedErr := &AppError{
Code: "REDIS_ERROR",
Code: "KV_ERROR",
RequestID: getRequestID(ctx),
Err: err,
}
+2 -2
View File
@@ -384,7 +384,7 @@ func TestCustomErrorTypeWrapping(t *testing.T) {
cmd1 := kv.NewStatusCmd(testCtx, "GET", "key")
loadingErr := proto.ParseErrorReply([]byte("-LOADING KV is loading the dataset in memory"))
customErr1 := &AppError{
Code: "REDIS_ERROR",
Code: "KV_ERROR",
Message: "Database operation failed",
RequestID: "req-12345",
Err: loadingErr,
@@ -398,7 +398,7 @@ func TestCustomErrorTypeWrapping(t *testing.T) {
// Verify error message contains custom context
errMsg := cmd1.Err().Error()
if !contains(errMsg, "REDIS_ERROR") || !contains(errMsg, "req-12345") {
if !contains(errMsg, "KV_ERROR") || !contains(errMsg, "req-12345") {
t.Errorf("Error message missing custom error context: %v", errMsg)
}