Adding new ExternalAuthProviderError that will be raised when we receive 'problem with LDAP service' response from server. by petyaslavova · Pull Request #3808 · redis/redis-py (original) (raw)

Pull Request Overview

This PR introduces a new ExternalAuthProviderError exception to handle authentication errors from external providers like LDAP. When the Redis server returns a "problem with LDAP service" error message, the client will now raise this specific exception instead of a generic error.

Key changes:

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
redis/exceptions.py Defines the new ExternalAuthProviderError exception class
redis/_parsers/base.py Integrates the new exception into the error parsing logic
tests/test_parsers/test_errors.py Adds test suite with mock Redis protocol implementation
tests/conftest.py Adds utility function to skip tests when hiredis parser is available

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.