fix: refreshAuth does a GET request W-19992404
#1248
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See this PR: jsforce/jsforce#1774
We do need the res[onse body for jsforce to tell when it shouldn't retry refreshing the session
What does this PR do?
in the linked jsforce PR we were able to stop the retry for
sf data querybecause it doing aGETrequest straight from the start but during QA @soridalac noticed thatsf org displaywas still getting stuck.This is because
org displaytries to refresh the token here:https://github.com/salesforcecli/plugin-org/blob/7b8d9631bd10f08c5bb2c720dfa915b6a080d6f2/src/commands/org/display.ts#L49
refreshAuthdoes aHEADrequest (only HTTP headers returned), so jsforce wasn't able to tell it should stop retrying based on the body response.updating the method to do a GET request now allows us to get the body msg:

What issues does this PR fix or reference?
@W-19992404@