File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ export const enum ErrorMessages {
2020 INVALID_LABEL_FILTER = "The characters '*' and ',' are not supported in label filters." ,
2121 INVALID_TAG_FILTER = "Tag filter must follow the format 'tagName=tagValue'" ,
2222 CONNECTION_STRING_OR_ENDPOINT_MISSED = "A connection string or an endpoint with credential must be specified to create a client." ,
23- REPLICA_DISCOVERY_NOT_SUPPORTED = "Replica discovery is not supported when loading from Azure Front Door." ,
24- LOAD_BALANCING_NOT_SUPPORTED = "Load balancing is not supported when loading from Azure Front Door."
23+ AFD_REPLICA_DISCOVERY_NOT_SUPPORTED = "Replica discovery is not supported when loading from Azure Front Door." ,
24+ AFD_LOAD_BALANCING_NOT_SUPPORTED = "Load balancing is not supported when loading from Azure Front Door." ,
25+ AFD_CLIENT_OPTIONS_NOT_SUPPORTED = "Custom client options are not supported when loading from Azure Front Door."
2526}
2627
2728export const enum KeyVaultReferenceErrorMessages {
Original file line number Diff line number Diff line change @@ -78,17 +78,18 @@ export async function loadFromAzureFrontDoor(
7878 appConfigOptions : AzureAppConfigurationOptions = { }
7979) : Promise < AzureAppConfiguration > {
8080 if ( appConfigOptions . replicaDiscoveryEnabled ) {
81- throw new ArgumentError ( ErrorMessages . REPLICA_DISCOVERY_NOT_SUPPORTED ) ;
81+ throw new ArgumentError ( ErrorMessages . AFD_REPLICA_DISCOVERY_NOT_SUPPORTED ) ;
8282 }
8383 if ( appConfigOptions . loadBalancingEnabled ) {
84- throw new ArgumentError ( ErrorMessages . LOAD_BALANCING_NOT_SUPPORTED ) ;
84+ throw new ArgumentError ( ErrorMessages . AFD_LOAD_BALANCING_NOT_SUPPORTED ) ;
85+ }
86+ if ( appConfigOptions . clientOptions ) {
87+ throw new ArgumentError ( ErrorMessages . AFD_CLIENT_OPTIONS_NOT_SUPPORTED ) ;
8588 }
8689 appConfigOptions . replicaDiscoveryEnabled = false ; // Disable replica discovery when loading from Azure Front Door
8790
8891 appConfigOptions . clientOptions = {
89- ...appConfigOptions . clientOptions ,
9092 additionalPolicies : [
91- ...( appConfigOptions . clientOptions ?. additionalPolicies || [ ] ) ,
9293 { policy : new AnonymousRequestPipelinePolicy ( ) , position : "perRetry" } ,
9394 { policy : new RemoveSyncTokenPipelinePolicy ( ) , position : "perRetry" }
9495 ]
You can’t perform that action at this time.
0 commit comments