title: Cannot Catch error when querying an invalid External Table
body: <p>When you have an external table created based on a non-existing table from another Azure SQL database. </p>
  
  <pre><code>SELECT * 
  FROM invalid_external_table
  </code></pre>
  
  <p>The following error message is thrown:</p>
  
  <blockquote>
    <p>Msg 46823, Level 16, State 1, Procedure<br>
    Error retrieving data from {azure database}. The underlying error message received was: 'Invalid object name 'dbo.invalid_table'.'.</p>
  </blockquote>
  
  <p>The problem that I'm dealing with is that you seem to be unable to catch this error. </p>
  
  <p>The following code results in the same error:</p>
  
  <pre><code>BEGIN TRY
      SELECT * 
      FROM invalid_external_table 
  END TRY
  BEGIN CATCH
      PRINT 'caught exception'
  END CATCH
  </code></pre>
  
  <p>I'm querying an external table in a Azure SQL database that is based on a table from another SQL database.</p>
  
  <p>Is is possible to either catch this error or validate the external table before querying the external table?</p>