-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Move predicate err check earlier, inside RetryWithRelogin #13368
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
cfe3078
Move predicate err check earlier, inside RetryWithRelogin
kimlisa c01cc34
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa 1992bc6
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa cb0f01b
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa ad09e60
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa 18e16b0
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa 9981faa
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa 6d48e83
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa 898ac3b
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa a6824b0
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa a174a17
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa d39a200
Merge branch 'master' into lisa/bug/resource-query-on-error
kimlisa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's already a predicate error, why do you have to wrap it in another predicate error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the IsPredicateError looks for keyword in the error to determine if its predicate, then we use a wrapper to add a link to the predicate documentation:
so if this is the error that returned:
it will get formatted to this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels to me that
RetryWithRelogin
shouldn't be concerned with doing special stuff with errors that have nothing to do with auth. 🤔Is there a single place which could wrap the predicate error before
RetryWithRelogin
catches it? Then we could changeIsErrorResolvableWithRelogin
to returnfalse
for predicate errors and that would be it.If that's not possible, then perhaps another solution would be to make
IsErrorResolvableWithRelogin
returnfalse
for predicate errors and then wrap them in specific callsites, as it was done before this PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for reviving this thread, I just noticed that this PR was made 2 weeks ago. Still, long term I think it'd be worthwhile to change it at some point. I think we would have to tackle this anyway when adding support for those queries to Connect.