title: AttributeError: 'IntegrityError' object has no attribute 'message' SQLAlchemy
body: <p>I was working through a book example on catching exceptions in SQLAlchemy Core using a try/except block:</p>
  
  <pre><code>from sqlalchemy.exc import IntegrityError
  ins = insert(users).values(
      username="cookiemon",            #This username is already in db, 
      email_address="damon@cookie.com", should throw an IntegrityError 
      phone="111-111-1111",             for violating unique constraint
      password="password"
      )
  try:
      result=connection.execute(ins)
  except IntegrityError as error:
      print(error.orig.message, error.params)
  </code></pre>
  
  <p>However, I get the following error message:</p>
  
  <blockquote>
    <p>AttributeError: 'IntegrityError' object has no attribute 'message'</p>
  </blockquote>
  
  <p>This is verbatim from the book example, why can't I display the error message?</p>