title: How can I be sure that an upload with S3Client::upload() has completed successfully?
body: <p>The <a href="http://docs.aws.amazon.com/aws-sdk-php-2/latest/class-Aws.S3.S3Client.html#_upload" rel="nofollow">AWS SDK for PHP documentation on upload()</a> is not very clear on how an upload succeeds, and how it fails:</p>
  
  <pre><code>Returns
      Guzzle\Service\Resource\Model
      Returns the modeled result of the performed operation
  </code></pre>
  
  <p>No <code>@throws</code> documented here, even though in my tests, when the request fails, a <code>Guzzle\Http\Exception\CurlException</code> is thrown.</p>
  
  <p>Is it safe to say that:</p>
  
  <ul>
  <li>When it fails, I can always catch the failure with <code>Guzzle\Http\Exception\HttpException</code></li>
  <li>If this exception is not thrown, then the transfer succeeded</li>
  </ul>
  
  <p>Or:</p>
  
  <ul>
  <li>Are there other exceptions (in the <code>Aws</code> namespace?) that can be thrown?</li>
  <li>Should I look for a success indicator in the <code>Model</code> returned?</li>
  </ul>