title: AFNetworking: Handle error globally and repeat request
body: <p>I have a use case that should be rather common but I can't find an easy way to handle it with AFNetworking:</p>
  
  <p>Whenever the server returns a specific status code for <em>any</em> request, I want to:</p>
  
  <ul>
  <li>remove a cached authentication token</li>
  <li>re-authenticate (which is a separate request)</li>
  <li>repeat the failed request.</li>
  </ul>
  
  <p>I thought that this could be done via some global completion/error handler in <code>AFHTTPClient</code>, but I didn't find anything useful. So, what's the "right" way to do what I want? Override <code>enqueueHTTPRequestOperation:</code> in my <code>AFHTTPClient</code> subclass, copy the operation and wrap the original completion handler with a block that does what I want (re-authenticate, enqueue copied operation)? Or am I on the wrong track altogether?</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: Removed reference to 401 status code, since that's probably reserved for HTTP basic while I'm using token auth.</p>