When SharePoint cannot talk to configuration database, provide a customized error message rather than the default Runtime Error.

Figure: Default 500 error message looks bad

Figure: Detailed error message – for investigation we can disable the custom error message, then detail error message is shown
We don’t mind the detailed error message shows in the ugly yellow background page, but the default 500 error message should be better.
[This is as per Do you use a customized error page to handle an unhandled error occurs on your website?]