We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74ac902 commit 9b4909bCopy full SHA for 9b4909b
packages/core/src/shared/extensionUtilities.ts
@@ -194,7 +194,13 @@ export function isSageMaker(appName: 'SMAI' | 'SMUS' = 'SMAI'): boolean {
194
}
195
196
export function isCn(): boolean {
197
- return getComputeRegion()?.startsWith('cn') ?? false
+ try {
198
+ return getComputeRegion()?.startsWith('cn') ?? false
199
+ } catch (e) {
200
+ // If compute region isn't initialized yet, assume we're not in a CN region
201
+ getLogger().debug('isCn called before compute region initialized, defaulting to false')
202
+ return false
203
+ }
204
205
206
/**
0 commit comments