Skip to content

Commit f585178

Browse files
committed
use endpoints for avalible region size
1 parent d288518 commit f585178

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/codewhisperer/region/regionProfileManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ export class RegionProfileManager {
172172
}
173173
}
174174

175-
if (availableProfiles.length === 0 && failedRegions.length > 0) {
176-
// Only throw error if all regions fail
175+
// Only throw error if all regions fail
176+
if (failedRegions.length === endpoints.size) {
177177
throw new Error(`Failed to list profiles for all regions: ${failedRegions.join(', ')}`)
178178
}
179179

0 commit comments

Comments
 (0)