You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(auth): handle network errors during restore/getChatAuthState (aws#5476)
## Problem
During extension startup, the auth system tries to restore the
connection. This may result in a `refreshToken` call. If a network error
happens during this, the connection restore fails and no connection is
set to active. Then, Amazon Q will clean up any "leftover" connections,
including this one, and the user will be completely logged out. The
connection is technically valid despite having an expired token, and
another call may clear up the network error and allow us to get better
token.
## Solution
The auth system will restore this connection even if it runs into a
network error. Then, Amazon Q will display as if its logged in normally.
If the network error was one-off, then there is no indication that there
was an issue to the user. If there are still network issues, using chat
or inline-suggestions will make an error display until `refreshToken` is
successful (or the registration expires).
Also, some telemetry updates were included to help make this visible.
Side effects:
- On session startup (with network error):
- No notification for new CW customizations
- "featureConfig" AKA A/B testing? will not initialize.
<!---
REMINDER:
- Read CONTRIBUTING.md first.
- Add test coverage for your changes.
- Update the changelog using `npm run newChange`.
- Link to related issues/commits.
- Testing: how did you test your changes?
- Screenshots (if the pull request is related to UI/UX then please
include light and dark theme screenshots)
-->
## License
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
0 commit comments