changed a failed db connection to throw exception