Skip to content

Commit

Permalink
Fix #99100
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Jun 3, 2020
1 parent b795a02 commit 3dd5ce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/platform/userDataSync/common/userDataSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions src/vs/platform/userDataSync/common/userDataSyncService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3dd5ce1

Please sign in to comment.