-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When mfdata is not started, an error stack trace ending with connecting to unix socket: /home/mfdata/var/redis.socket. No such file or directory is shown to the user :
File "/opt/metwork-mfext-2.1/opt/python3/lib/python3.10/site-packages/redis/client.py", line 1235, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "/opt/metwork-mfext-2.1/opt/python3/lib/python3.10/site-packages/redis/connection.py", line 1387, in get_connection
connection.connect()
File "/opt/metwork-mfext-2.1/opt/python3/lib/python3.10/site-packages/redis/connection.py", line 617, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 2 connecting to unix socket: /home/mfdata/var/redis.socket. No such file or directory.
It's not really readable for an user who maybe doesn't know that redis is used inside mfdata.
So it should be better to catch the error and to display an understandable message to the user, for example:
The redis socket is not found. You must start the mfdata module before using it.
or
It seems mfdata is not started. Start the module before use.
You can reproduce it by stopping mfdata and trying to inject a file using inject_file --incoming <file>
Metadata
Metadata
Assignees
Labels
No labels