Closed khasinski closed 10 years ago
Just what the doctor ordered. Too bad it hasn't been pulled in yet.
I did noticed though that when all requests are rejected and another interceptor is grabbing the response, the responses are 'undefined'.
I was just writing this method! Thanks. :)
On 19 September 2013 16:57, tschofen notifications@github.com wrote:
Just what the doctor ordered. Too bad it hasn't been pulled in yet.
I did noticed though that when all requests are rejected and another interceptor is grabbing the response, the responses are 'undefined'.
— Reply to this email directly or view it on GitHubhttps://github.com/witoldsz/angular-http-auth/pull/34#issuecomment-24745167 .
Petrus Theron http://petrustheron.com
@witoldsz care to comment? ;)
@khasinski would you mind to respond to @tschofen's query? Appreciate that.
I did noticed though that when all requests are rejected and another interceptor is grabbing the response, the responses are 'undefined'.
Well, looking at the commit 5727c6c, there is:
buffer[i].deferred.reject();
I think this wrong, because there is no reject parameter. Anyone who wants to catch such a reject - will get nothing.
Why isn't there one? I mean, you are referring to it in retryHttpRequest
(within the error callback).
Whet isn't there one? You mean there is no parameter in the reject()
method? I don't know (notice, the 5727c6c is was not merged). I guess the author of that commit simply forgot about it, looks like he really didn't need it.
@witoldsz Yes, you said there is no reject parameter. But why do you say there wouldn't be one? I mean, you are pointing to that exact parameter in your own function, retryHttpRequest
.
I didn't say there wouldn't be one. I just answered the question - pointing to the bug in the referenced commit. Whoever merged this commit can simply fix it.
I get you now. I was reading your answer out of context.
Cherry picked: 17300929fd856d9d17ece2a9612f828248312ed8 Also, cancel action can either abandon or reject the buffer.
Rejects all the requests and boradcasts event:auth-loginCancelled
Extracted from @stu-salsbury's pull request.