Closed victor-torres closed 6 years ago
This also covers the case when the user has an active session, but the tg2 could not connect to the database. This could be reproduced in a vanilla tg2 app with debug = false in the .ini config file.
In this case, the user is presented with a message instead of regular error document page: Internal Server Error.
This is not something that the framework should handle. If the application crashes, the framework should properly report it as a "Server Error".
Also I don't feel this is in general a good idea, if there is an error the user will just get randomly logged out. If you can recover from the error the implemented TGAuthMetadata
should try to recover (for example retrying the database query) , if it's an error you can't recover from the app should just report a server error to the client.
Hiding software failures is generally a very bad idea and it's better to fail quick and near to the real error source.
Thanks for your time reviewing this code. I understand your point of view.
The TGAuthMetadata class could be overridden by users. TurboGears should catch possible exceptions raised by customizations in the get methods.