Checked for and handled any errors on pool.getConnection.