From 3dd5ce161202b0da2f4c202e29ebd4ab04d787ec Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 3 Jun 2020 12:03:56 +0200 Subject: [PATCH] Fix #99100 --- src/vs/platform/userDataSync/common/userDataSync.ts | 2 +- src/vs/platform/userDataSync/common/userDataSyncService.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/userDataSync/common/userDataSync.ts b/src/vs/platform/userDataSync/common/userDataSync.ts index ee1fcbcb6029a..14ea209eb9820 100644 --- a/src/vs/platform/userDataSync/common/userDataSync.ts +++ b/src/vs/platform/userDataSync/common/userDataSync.ts @@ -211,7 +211,7 @@ export class UserDataSyncError extends Error { constructor(message: string, public readonly code: UserDataSyncErrorCode, public readonly resource?: SyncResource) { super(message); - this.name = `${this.code} (UserDataSyncError) ${this.resource}`; + this.name = `${this.code} (UserDataSyncError) ${this.resource || ''}`; } static toUserDataSyncError(error: Error): UserDataSyncError { diff --git a/src/vs/platform/userDataSync/common/userDataSyncService.ts b/src/vs/platform/userDataSync/common/userDataSyncService.ts index b190d16eac091..957ad58f04cf0 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncService.ts @@ -400,6 +400,8 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ if (e instanceof UserDataSyncError) { switch (e.code) { case UserDataSyncErrorCode.TooLarge: + throw new UserDataSyncError(e.message, e.code, source); + case UserDataSyncErrorCode.TooManyRequests: case UserDataSyncErrorCode.LocalTooManyRequests: case UserDataSyncErrorCode.Gone: