From 732d7ce8fa3d145b14b0913ff5fecd34648fbcb8 Mon Sep 17 00:00:00 2001 From: Steve Faulkner Date: Mon, 15 Mar 2021 22:47:49 -0500 Subject: [PATCH] Fix upload worker error display (#547) --- src/Common/ErrorHandlingUtils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Common/ErrorHandlingUtils.ts b/src/Common/ErrorHandlingUtils.ts index c303e1f74..8a86bdf32 100644 --- a/src/Common/ErrorHandlingUtils.ts +++ b/src/Common/ErrorHandlingUtils.ts @@ -1,8 +1,9 @@ -import { ARMError } from "../Utils/arm/request"; -import { HttpStatusCodes } from "./Constants"; import { MessageTypes } from "../Contracts/ExplorerContracts"; import { SubscriptionType } from "../Contracts/SubscriptionType"; +import { userContext } from "../UserContext"; +import { ARMError } from "../Utils/arm/request"; import { logConsoleError } from "../Utils/NotificationConsoleUtils"; +import { HttpStatusCodes } from "./Constants"; import { logError } from "./Logger"; import { sendMessage } from "./MessageHandler"; @@ -44,7 +45,7 @@ const sendNotificationForError = (errorMessage: string, errorCode: number | stri const replaceKnownError = (errorMessage: string): string => { if ( - window.dataExplorer?.subscriptionType() === SubscriptionType.Internal && + userContext.subscriptionType === SubscriptionType.Internal && errorMessage?.indexOf("SharedOffer is Disabled for your account") >= 0 ) { return "Database throughput is not supported for internal subscriptions.";