Adds exception handling for db instance connection error