title: Long response time when exception is thrown
body: <p>There are 3 layers in the application.</p>
  <ul>
  <li>Api</li>
  <li>Application</li>
  <li>Infrastructure</li>
  </ul>
  <p><strong>Test 1</strong></p>
  <p>An application level exception is thrown.</p>
  <p><em>here are the codes</em></p>
  <p><strong>Api</strong></p>
  <pre><code> public async Task&lt;IActionResult&gt; Get()
   {
       await _app.Handler();
   }
  </code></pre>
  <p><strong>Application</strong></p>
  <pre><code> public async Task Handler()
   {
       throw new NotFoundException();
   }
  
   public class NotFoundException : Exception
   {
       public NotFoundException()
           : base($&quot;Product not found.&quot;)
       {
       }
   }
  </code></pre>
  <p><strong>Infrastructure</strong></p>
  <pre><code> public async Task Service()
   {
       return null;
   }
  </code></pre>
  <p><em>Here is the result</em></p>
  <p>Exception thrown: 'Application.Exceptions.NotFoundException' in Application.dll</p>
  <p>Exception thrown: 'Application.Exceptions.NotFoundException' in System.Private.CoreLib.dll</p>
  <p>Response Time 400ms between 500ms</p>
  <p><strong>Test 2</strong></p>
  <p>An infrastructure level exception is thrown.</p>
  <p><em>here are the codes</em></p>
  <p><strong>Api</strong></p>
  <pre><code> public async Task&lt;IActionResult&gt; Get()
   {
       await _app.Handler();
   }
  </code></pre>
  <p><strong>Application</strong></p>
  <pre><code> public async Task Handler()
   {
       return null;
   }
  </code></pre>
  <p><strong>Infrastructure</strong></p>
  <pre><code> public async Task Service()
   {
       throw new NotFoundException();
   }
   
   public class NotFoundException : Exception
   {
       public NotFoundException()
           : base($&quot;Product not found.&quot;)
       {
       }
   }
  </code></pre>
  <p><em>Here is the result</em></p>
  <p>Exception thrown: 'Infrastructure.Exceptions.NotFoundException' in Infrastructure.dll</p>
  <p>Exception thrown: 'Infrastructure.Exceptions.NotFoundException' in System.Private.CoreLib.dll</p>
  <p>Exception thrown: 'Infrastructure.Exceptions.NotFoundException' in System.Private.CoreLib.dll</p>
  <p>Response Time 800ms between 900ms</p>
  <p><strong>Question</strong></p>
  <p>why response time increases?</p>
  <p>is this a usual thing?</p>