You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -247,7 +247,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
247
247
})
248
248
]);
249
249
}catch(error){
250
-
if(!isInstantlyThrowError(error)){
250
+
if(!isArgumentError(error)){
251
251
consttimeElapsed=Date.now()-startTimestamp;
252
252
if(timeElapsed<MIN_DELAY_FOR_UNHANDLED_FAILURE){
253
253
// load() method is called in the application's startup code path.
@@ -282,22 +282,22 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
282
282
constsegment=segments[i];
283
283
// undefined or empty string
284
284
if(!segment){
285
-
thrownewOperationError(`Failed to construct configuration object: Invalid key: ${key}`);
285
+
thrownewInvalidOperationError(`Failed to construct configuration object: Invalid key: ${key}`);
286
286
}
287
287
// create path if not exist
288
288
if(current[segment]===undefined){
289
289
current[segment]={};
290
290
}
291
291
// The path has been occupied by a non-object value, causing ambiguity.
292
292
if(typeofcurrent[segment]!=="object"){
293
-
thrownewOperationError(`Ambiguity occurs when constructing configuration object from key '${key}', value '${value}'. The path '${segments.slice(0,i+1).join(separator)}' has been occupied.`);
293
+
thrownewInvalidOperationError(`Ambiguity occurs when constructing configuration object from key '${key}', value '${value}'. The path '${segments.slice(0,i+1).join(separator)}' has been occupied.`);
294
294
}
295
295
current=current[segment];
296
296
}
297
297
298
298
constlastSegment=segments[segments.length-1];
299
299
if(current[lastSegment]!==undefined){
300
-
thrownewOperationError(`Ambiguity occurs when constructing configuration object from key '${key}', value '${value}'. The key should not be part of another key.`);
300
+
thrownewInvalidOperationError(`Ambiguity occurs when constructing configuration object from key '${key}', value '${value}'. The key should not be part of another key.`);
301
301
}
302
302
// set value to the last segment
303
303
current[lastSegment]=value;
@@ -310,7 +310,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
0 commit comments