diff --git a/src/Common/CosmosClient.ts b/src/Common/CosmosClient.ts index 81cf6c234..ab5548899 100644 --- a/src/Common/CosmosClient.ts +++ b/src/Common/CosmosClient.ts @@ -243,16 +243,13 @@ export function client(): Cosmos.CosmosClient { const options: Cosmos.CosmosClientOptions = { endpoint: endpoint() || "https://cosmos.azure.com", // CosmosClient gets upset if we pass a bad URL. This should never actually get called - // endpoint: "https://test-craig-nosql-westus3.documents.azure.com:443/", - // endpoint: "https://test-craig-nosql-eastus2.documents.azure.com:443/", key: userContext.dataPlaneRbacEnabled ? "" : userContext.masterKey, tokenProvider, userAgentSuffix: "Azure Portal", defaultHeaders: _defaultHeaders, connectionPolicy: { retryOptions: { - //maxRetryAttemptCount: LocalStorageUtility.getEntryNumber(StorageKey.RetryAttempts), - maxRetryAttemptCount: 0, + maxRetryAttemptCount: LocalStorageUtility.getEntryNumber(StorageKey.RetryAttempts), fixedRetryIntervalInMilliseconds: LocalStorageUtility.getEntryNumber(StorageKey.RetryInterval), maxWaitTimeInSeconds: LocalStorageUtility.getEntryNumber(StorageKey.MaxWaitTimeInSeconds), }, diff --git a/src/Common/ErrorHandlingUtils.ts b/src/Common/ErrorHandlingUtils.ts index f8334eb79..4476a0476 100644 --- a/src/Common/ErrorHandlingUtils.ts +++ b/src/Common/ErrorHandlingUtils.ts @@ -9,9 +9,7 @@ import { sendMessage } from "./MessageHandler"; export const handleError = (error: string | ARMError | Error, area: string, consoleErrorPrefix?: string): void => { const errorMessage = getErrorMessage(error); - const anyError = error as any; - const errorCode: string | number | undefined = - error instanceof ARMError ? error.code : anyError?.code ? anyError.code : undefined; + const errorCode = error instanceof ARMError ? error.code : undefined; // logs error to data explorer console const consoleErrorMessage = consoleErrorPrefix ? `${consoleErrorPrefix}:\n ${errorMessage}` : errorMessage;