<p><strong>Important:</strong> This example shows the minimum case, where you don't handle any errors within <code>GetHttpResponseAsync</code>, but you're not limited to this. You're free to detect error conditions within your code and call <code>capturedPromise.Reject()</code> yourself with (more useful) error messages at any time. However you should <em>always</em> include this final handler, to catch any unexpected and unhandled exceptions that may occur, especially when calling Windows APIs. Just be sure that you only call <code>Reject()</code> once and that nothing executes afterwards.</p>
0 commit comments