aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.41k stars 346 forks source link

fix(amazonq): "Failed to run: refreshConnectionCallback" #5205

Closed justinmk3 closed 1 week ago

justinmk3 commented 1 week ago

Problem

command sometimes shows an error during teardown:

Failed to run command: aws.amazonq.refreshConnectionCallback: Cannot
read properties of undefined (reading 'scopes')

Solution

There may be a race somewhere, when we update the connections list. To mitigate, handle undefined AwsConnection.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.