Commit 7983fc1
authored
fix(amazonq): throw if no region profiles are available (aws#7357)
## Problem
When ListRegionProfile call throttles for a subset of regions, we
currently do not throw, but instead return the available profiles in the
regions where the call succeeded. However, if that list is empty (no
profiles in that region), we return an empty list. This breaks the UI,
and causes a state that is not recoverable
## Solution
Throw an error in the scenario where availableProfiles is empty. This
triggers a retry state in the UI, making the state recoverable.
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.1 parent 67295aa commit 7983fc1
File tree
1 file changed
+11
-3
lines changed- packages/core/src/codewhisperer/region
1 file changed
+11
-3
lines changedLines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
188 | 196 | | |
189 | 197 | | |
190 | 198 | | |
| |||
0 commit comments