title: Assertionerror - Display only error message
body: <p>I've the folowing code and want to print only the error (No data found, symbol may be delisted).</p>
  <p>Is it possible write better code?</p>
  <pre><code>import yahoo_fin.stock_info as si
  import sys
  try:
      quoteinfo = si.get_data(&quot;badticker&quot;,start_date = &quot;01/01/2022&quot;, end_date = &quot;04/30/2022&quot;)
      print(quoteinfo)
  except AssertionError as e:
      if (  &quot;symbol may be delisted&quot; in str(e)) :
          print ('Ticker is invalid')
      else:
          print(e)
  </code></pre>
  <p>Exception :</p>
  <blockquote>
  <p>{'chart': {'result': None, 'error': {'code': 'Not Found',
  'description': 'No data found, symbol may be delisted'}}}</p>
  </blockquote>