Alamofire 4.0 RequestRetrier should(_,retry,with,completion) not being called : <p>I am using the <code>RequestRetrier</code> of Alamofire 4.0 to control the retrying of requests for expired access token. I am following the documentation <a href="https://github.com/Alamofire/Alamofire#adapting-and-retrying-requests" rel="noreferrer">here</a>.</p>

<p>I have a very similar implementation to the example available in the documentation <code>OAuth2Handler</code> which implements <code>RequestAdapter</code> and <code>RequestRetrier</code>. </p>

<p>The issue I am encountering is that <code>func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion)</code> is never being called. The <code>adapt</code> method of the <code>RequestAdapter</code> implementation does get called though.</p>

<p>Debugging, I see that <code>SessionDelegate</code> only calls <code>should(_,retry,with,completion)</code> when there is an error, but requests that return status codes related to Authorization issues, don't seem to generate errors, so that method never gets called.</p>

<p>Am I missing something here?</p>
