diff options
Diffstat (limited to 'redis/asyncio/connection.py')
-rw-r--r-- | redis/asyncio/connection.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/redis/asyncio/connection.py b/redis/asyncio/connection.py index 6823dcb..db8c240 100644 --- a/redis/asyncio/connection.py +++ b/redis/asyncio/connection.py @@ -87,6 +87,15 @@ MODULE_EXPORTS_DATA_TYPES_ERROR = ( "exports one or more module-side data " "types, can't unload" ) +# user send an AUTH cmd to a server without authorization configured +NO_AUTH_SET_ERROR = { + # Redis >= 6.0 + "AUTH <password> called without any password " + "configured for the default user. Are you sure " + "your configuration is correct?": AuthenticationError, + # Redis < 6.0 + "Client sent AUTH, but no password is set": AuthenticationError, +} class _HiredisReaderArgs(TypedDict, total=False): @@ -160,7 +169,9 @@ class BaseParser: MODULE_EXPORTS_DATA_TYPES_ERROR: ModuleError, NO_SUCH_MODULE_ERROR: ModuleError, MODULE_UNLOAD_NOT_POSSIBLE_ERROR: ModuleError, + **NO_AUTH_SET_ERROR, }, + "WRONGPASS": AuthenticationError, "EXECABORT": ExecAbortError, "LOADING": BusyLoadingError, "NOSCRIPT": NoScriptError, |