diff options
Diffstat (limited to 'src/vs/platform/userDataSync/common/userDataSyncStoreService.ts')
-rw-r--r-- | src/vs/platform/userDataSync/common/userDataSyncStoreService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts b/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts index f498de36c89..8ae695baae4 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts @@ -20,7 +20,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IFileService } from 'vs/platform/files/common/files'; import { IProductService } from 'vs/platform/product/common/productService'; -import { asJson, asText, IRequestService, isSuccess as isSuccessContext } from 'vs/platform/request/common/request'; +import { asJson, asTextOrError, IRequestService, isSuccess as isSuccessContext } from 'vs/platform/request/common/request'; import { getServiceMachineId } from 'vs/platform/externalServices/common/serviceMachineId'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { CONFIGURATION_SYNC_STORE_KEY, HEADER_EXECUTION_ID, HEADER_OPERATION_ID, IAuthenticationProvider, IResourceRefHandle, IUserData, IUserDataManifest, IUserDataSyncLogService, IUserDataSyncStore, IUserDataSyncStoreClient, IUserDataSyncStoreManagementService, IUserDataSyncStoreService, ServerResource, SYNC_SERVICE_URL_TYPE, UserDataSyncErrorCode, UserDataSyncStoreError, UserDataSyncStoreType } from 'vs/platform/userDataSync/common/userDataSync'; @@ -254,7 +254,7 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync headers['Cache-Control'] = 'no-cache'; const context = await this.request(url, { type: 'GET', headers }, [], CancellationToken.None); - const content = await asText(context); + const content = await asTextOrError(context); return content; } @@ -295,7 +295,7 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync throw new UserDataSyncStoreError('Server did not return the ref', url, UserDataSyncErrorCode.NoRef, context.res.statusCode, context.res.headers[HEADER_OPERATION_ID]); } - const content = await asText(context); + const content = await asTextOrError(context); if (!content && context.res.statusCode === 304) { throw new UserDataSyncStoreError('Empty response', url, UserDataSyncErrorCode.EmptyResponse, context.res.statusCode, context.res.headers[HEADER_OPERATION_ID]); } @@ -352,7 +352,7 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync throw new UserDataSyncStoreError('Server did not return the ref', url, UserDataSyncErrorCode.NoRef, context.res.statusCode, context.res.headers[HEADER_OPERATION_ID]); } - const content = await asText(context); + const content = await asTextOrError(context); if (!content && context.res.statusCode === 304) { throw new UserDataSyncStoreError('Empty response', url, UserDataSyncErrorCode.EmptyResponse, context.res.statusCode, context.res.headers[HEADER_OPERATION_ID]); } |