Skip to content

Commit ca3c113

Browse files
update
1 parent 11b5325 commit ca3c113

File tree

3 files changed

+5
-445
lines changed

3 files changed

+5
-445
lines changed

src/AzureAppConfigurationImpl.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import { InvalidOperationError, ArgumentError, isFailoverableError, isInputError
5858

5959
const MIN_DELAY_FOR_UNHANDLED_FAILURE = 5_000; // 5 seconds
6060

61-
const MAX_TAG_FILTERS = 5;
61+
const MAX_TAG_FILTER_COUNT = 5;
6262

6363
type PagedSettingSelector = SettingSelector & {
6464
/**
@@ -912,7 +912,7 @@ function getValidSettingSelectors(selectors: SettingSelector[]): SettingSelector
912912
}
913913
} else {
914914
if (!selector.keyFilter && (!selector.tagFilters || selector.tagFilters.length === 0)) {
915-
throw new ArgumentError("Key filter cannot be null or empty.");
915+
throw new ArgumentError("Key filter and tag filter cannot both be null or empty.");
916916
}
917917
if (!selector.labelFilter) {
918918
selector.labelFilter = LabelFilter.Null;
@@ -965,8 +965,8 @@ function getValidFeatureFlagSelectors(selectors?: SettingSelector[]): SettingSel
965965
}
966966

967967
function validateTagFilters(tagFilters: string[]): void {
968-
if (tagFilters.length > MAX_TAG_FILTERS) {
969-
throw new Error(`The number of tag filters cannot exceed ${MAX_TAG_FILTERS}.`);
968+
if (tagFilters.length > MAX_TAG_FILTER_COUNT) {
969+
throw new Error(`The number of tag filters cannot exceed ${MAX_TAG_FILTER_COUNT}.`);
970970
}
971971
for (const tagFilter of tagFilters) {
972972
const res = tagFilter.split("=");

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export enum LabelFilter {
7575
*/
7676
export enum TagFilter {
7777
/**
78-
* Matches key-values without a label.
78+
* Represents empty tag value.
7979
*/
8080
Null = ""
8181
}

0 commit comments

Comments
 (0)