Issue
Steps:
- Add a new account using the local folder /home/USER/drive.
- Delete the Engine database.
- Add a new account using the local folder /home/USER/drive.
2019-07-18 15:52:34 32431 140618611681088 ERROR nxdrive.gui.api Unexpected error Traceback (most recent call last): File "gui/api.py", line 532, in bind_server **kwargs, File "gui/api.py", line 501, in _bind_server starts=False, File "manager.py", line 661, in bind_engine engine_def = self.dao.add_engine(engine_type, local_folder, uid, name) File "engine/dao/sqlite.py", line 594, in add_engine (path, engine, key, name), File "engine/dao/sqlite.py", line 129, in execute return super().execute(*args, **kwargs) sqlite3.IntegrityError: UNIQUE constraint failed: Engines.local_folder
On the GUI side, the error is "Unknown error occurrend when trying to connect".
Fix
We should catch the error and display a proper message.
And add tests.