Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(responseError): log error if not config #133

Merged
merged 1 commit into from
Feb 17, 2015

Conversation

PatrickJS
Copy link
Contributor

How's this?

@chieffancypants
Copy link
Owner

Hmm, does this work for you? I don't have an example of a broken interceptor -- but my understanding is that angular takes the status code (from response.status) to determine whether response or responseError is used. If there is no response object, it can't tell which to use, and uses response by default.

In your example, I suppose it depends on a proper response being returned, but simply missing the config object on that response -- whereas, I would imagine the majority of interceptors simply forget to return the response completely in some specific condition.

chieffancypants added a commit that referenced this pull request Nov 4, 2014
@chieffancypants
Copy link
Owner

@gdi2290 I made a few changes to your proposal and ended up attempting to validate my suspicions above using some tests. Let me know if this still solves your use-case.

@PatrickJS
Copy link
Contributor Author

I like it

chieffancypants added a commit that referenced this pull request Feb 17, 2015
feat(responseError): log error if not config
@chieffancypants chieffancypants merged commit 25f7e26 into chieffancypants:master Feb 17, 2015
@chieffancypants chieffancypants added this to the next version milestone Feb 17, 2015
@PatrickJS PatrickJS deleted the patch-2 branch February 17, 2015 18:06
chieffancypants added a commit that referenced this pull request Feb 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants