Commit 040b10b
authored
fix(amazonq): throw if no region profiles are available (aws#7360)
Duplicate PR of aws#7357 into
Flare branch
## 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 c17efa1 commit 040b10b
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 | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
182 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
| |||
0 commit comments