-
Notifications
You must be signed in to change notification settings - Fork 5
Bail early on bad token #482
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
Bail early on bad token #482
Conversation
Merging to
|
58847ba
to
9ff3222
Compare
|
||
// Verify only the quarantine config request was made | ||
let requests = state.requests.lock().unwrap().clone(); | ||
assert_eq!(requests.len(), 0); |
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.
Why are we expecting 0 requests instead of 1?
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 request didn't go through because it raises an error above.
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.
But how do you get the error from the state server without sending a request to it? Doesn't the cli have to send a request to get the 404 from the server?
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 logic in the mock_server is such that if there's an error during the request then this will not be populated if there is an error. I agree it's confusing given the name and we should move towards it always being populated.
0bd87fb
to
6452ff6
Compare
Closing this since it isn't as easy as we'd hoped |
We shouldn't keep trying our endpoints if we've already detected an issue with the token / org combination.