Skip to content

Fix error handling in redisurl package#22

Open
doron-sincere wants to merge 2 commits intomasterfrom
fix-redisurl-error-handling
Open

Fix error handling in redisurl package#22
doron-sincere wants to merge 2 commits intomasterfrom
fix-redisurl-error-handling

Conversation

@doron-sincere
Copy link
Member

Fixes resource leaks and improves error handling:

  • Return nil on parse/dial failures
  • Return connection with error after successful dial (allows caller cleanup and retry logic)
  • Support newer Redis AUTH error messages
  • Add error case tests

- return explicit error values instead of naked returns
- handle error from SELECT command when switching databases
- return nil on parse/dial errors for consistency
- return connection with error after dial for caller-managed cleanup
- add support for newer Redis AUTH error message
- use errors.Is() for error checking in pool
- add tests for error cases
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.

1 participant