Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

oaspUnauthenticatedRequestResender likely to break promise chaining when rejected by authenticator #57

Open
dumbNickname opened this issue Sep 23, 2015 · 0 comments
Labels

Comments

@dumbNickname
Copy link
Contributor

Hi,

When authentication is rejected, cancelAllAwaitingRequestsOnFailure is executed, which goes through the queue of responses and calls 'cancel' for all of them. Unfortunately cancel rejects a promise with no value provided. Interceptor plays with HTTP responses so it should always provide something compatible with this API. It is very likely to break promises chaining here, as failure callbacks might blindly try to read some basic information from response like data, status, url, headers etc. (in order to provide some feedback to the user).

I would propose to return original unauthorized response in case of canceling.

Cheers,
Bartek

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant