Skip to content

bindings/redis: use IsNilValueError instead of hardcoded nil string - #4425

Open
AdilRMallick wants to merge 3 commits into
dapr:mainfrom
AdilRMallick:fix/redis-binding-nil-check
Open

bindings/redis: use IsNilValueError instead of hardcoded nil string#4425
AdilRMallick wants to merge 3 commits into
dapr:mainfrom
AdilRMallick:fix/redis-binding-nil-check

Conversation

@AdilRMallick

@AdilRMallick AdilRMallick commented Jun 29, 2026

Copy link
Copy Markdown

Description

The Redis output binding detected a key-miss on GET/GETDEL by string-matching the error text (err.Error() == "redis: nil"). If the error is wrapped, the match fails, the miss goes undetected, and the binding returns a hard error instead of an empty response.
This replaces the string match with the RedisClient interface's existing IsNilValueError(err) method (implemented as errors.Is(err, Nil) in both the v8 and v9 clients), aligning bindings/redis with how v8client.go, v9client.go, and configuration/redis already handle nil values.

Issue reference

Closes issue #4424

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • [ Check] Code compiles correctly
  • [Check ] Created/updated tests
  • Extended the documentation
    • Created the dapr/docs PR: N/A — internal robustness/consistency fix with no user-facing behavior or configuration change

Note: We expect contributors to open a corresponding documentation PR in the dapr/docs repository. As the implementer, you are the best person to document your work! Implementation PRs will not be merged until the documentation PR is opened and ready for review.

@AdilRMallick
AdilRMallick requested review from a team as code owners June 29, 2026 17:28
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.

2 participants