Revert "remove the db connection-related exceptions"

This reverts commit d273af52311ca235102992b750c9b01d5e5e7aac.