-
Notifications
You must be signed in to change notification settings - Fork 27.4k
feat($resource): pass status
/statusText
to success callbacks
#14836
feat($resource): pass status
/statusText
to success callbacks
#14836
Conversation
Another idea (but a slightly bigger breaking change) would be to pass the whole Considering the potential BC (mainly in tests), I suggest we land this on 1.6.x only. Should I add a notice (i.e. is it a real BC)? |
What things other than status & statusText could be realistically required from the response? On one hand, the more generic version is better because the API won't get ugly when you have to add it later anyway, but on the other hand, if no other things but status & statusText are used, then we should stick to them. |
I can't think of anything else - just future-proofing 😄 |
I've merged it in into master and I'm happy to merge it into 1.5.x, as breaking in tests isn't a BC to me. |
I am fine merging it into 1.5.x too. |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature.
What is the current behavior? (You can also link to an open issue here)
Only the data/instance and the headers function are passed to success callbacks.
What is the new behavior (if this is a feature change)?
The
status
andstatusText
are also passed to the success callbacks.Does this PR introduce a breaking change?
No. Yes. I don't know. Could be...in tests...if someone verifies what arguments their callbacks are called with...
Please check if the PR fulfills these requirements
Other information:
Fixes #8341
Closes #8841