title: Polly timeout policy clarification
body: <p>I am trying to get the timeout policy to work correctly.
  I have the following requirements while integrating an api.</p>
  <ol>
  <li>Create an http request to invoke endpoint1 and pass the transactionID and capture the result</li>
  <li>if the http request does not receive an answer in 20 seconds then send a cancel request with the same transactionID and capture the result</li>
  </ol>
  <p>For this task I would like to use Polly which seems to me a fantastic component to help handling transient failures. However as I am very new to this technology I just want to be sure if I am implementing correctly.</p>
  <p>First of all I have created a timeout policy with Polly like this</p>
  <pre><code>var timeoutPolicy =
      Policy.TimeoutAsync(
          TimeSpan.FromSeconds( 20 ),
          TimeoutStrategy.Optimistic,
          async ( context, timespan, task ) =&gt; {
              //write here the cancel request 
          } );
  </code></pre>
  <p>then after that I am ready to execute the policy</p>
  <pre><code>var policyResult = await timeoutPolicy.ExecuteAndCaptureAsync( async () =&gt; {
      //make here the request 1
  } );
  </code></pre>
  <p>What I got from the documentation is that if a timeout occurs inside the <code>timeoutPolicy.ExecuteAndCaptureAsync</code> delegate Polly automagically invoke the <code>onTimeout</code> delegate. Right?</p>
  <p>However my questions are:</p>
  <ul>
  <li>What happens if inside the execute delegate an exception occurs? Should I wrap that polly construct in a try catch?</li>
  <li>When I analyze the policy result how do I understand if the timeout has happened or not?</li>
  </ul>