Skip to content

Commit da2845d

Browse files
update error type
1 parent 381d833 commit da2845d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AzureAppConfigurationImpl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,10 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
497497
} else { // snapshot selector
498498
const snapshot = await this.#getSnapshot(selector.snapshotName);
499499
if (snapshot === undefined) {
500-
throw new Error(`Could not find snapshot with name ${selector.snapshotName}.`);
500+
throw new InvalidOperationError(`Could not find snapshot with name ${selector.snapshotName}.`);
501501
}
502502
if (snapshot.compositionType != KnownSnapshotComposition.Key) {
503-
throw new Error(`Composition type for the selected snapshot with name ${selector.snapshotName} must be 'key'.`);
503+
throw new InvalidOperationError(`Composition type for the selected snapshot with name ${selector.snapshotName} must be 'key'.`);
504504
}
505505
const pageIterator = listConfigurationSettingsForSnapshotWithTrace(
506506
this.#requestTraceOptions,

0 commit comments

Comments
 (0)