 <p>I had to change the line:</p> <pre><code>return err!=nil &amp;&amp; [res statusCode]!=404; </code></pre> <p>to </p> <pre><code>return err==nil &amp;&amp; [res statusCode]!=404; </code></pre> <p>for the correct Bool return. The error should remain nil.</p>