title: Exception when GetItemQueryIterator() can't find a matching document in Cosmos DB
body: <p>So, I'm trying to query cosmos collection for a specific document, with the following line of code:</p>
  <pre><code>FeedIterator&lt;dynamic&gt; querieditem = container.GetItemQueryIterator&lt;dynamic&gt;(mysqlquery);
  </code></pre>
  <p>When there exists an item in the database, this goes without any problems. However, when there doesn't exist any match in the database, I get the following exception:</p>
  <blockquote>
  <p>System.Private.CoreLib: Exception while executing function: TestFunction. Microsoft.Azure.Cosmos.Client: Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId:123123; Reason: (Message: {&quot;Errors&quot;:[&quot;Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found&quot;]}</p>
  </blockquote>
  <p>Does this really mean, that I need to add a try/catch, in case <code>GetItemQueryIterator()</code> can't find anything in Cosmos? Given that it is necessary, why does this make sense?</p>