Improve error message when authentication isn't setup yet (instead of traceback)
|Reported by:||Owned by:||Jonas Borgström|
I created a new project but I forgot to setup authentication in the Apache config file.
When I try to log in, I get the following error:
Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 335, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 220, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.4/site-packages/trac/web/auth.py", line 95, in process_request self._do_login(req) File "/usr/lib/python2.4/site-packages/trac/web/auth.py", line 116, in _do_login assert req.remote_user, 'Authentication information not available.' AssertionError: Authentication information not available.
It would be nice to have a friendlier error message like "You can't log in because authentication is not setup yet. Please ask the adminstrator of your Trac system or your system adminstrator to set up authentication."
Another solution might be to hide or disable the login link, but I like the idea of being able to find out what you can do about the situation if authentication is not enabled.
Showing the traceback right now is mystifying to the user. Even for an adminstrator, it takes a bit of work to figure out what caused the problem.
Change History (3)
comment:2 by , 13 years ago
|Summary:||Crash when trying to log in and authentication isn't setup yet → Improve error message when authentication isn't setup yet (instead of traceback)|