title: How to find the offending attribute with a sqlalchemy IntegrityError
body: <p>I have a very simple SqlAlchemy model</p>
  
  <pre><code>class User(Base):
      """ The SQLAlchemy declarative model class for a User object. """
      __tablename__ = 'users'
      id = Column(Integer, primary_key=True)
      phone = Column(String, unique=True)
      email = Column(String, unique=True)
  </code></pre>
  
  <p>When inserting a new User, an <code>IntegrityError</code> could occur if the email or phone is a duplicate. </p>
  
  <p>Is there any way to detect which of the columns was violating the integrity error? Or is the only way to do a separate query to see or a value is present?</p>