{"record":{"id":"ec041ea04fb60e37","repo":"immich-app/immich","slug":"syncrequesttype-partnerassetsv1-is-deprecated-use","errorCode":null,"errorMessage":"SyncRequestType.PartnerAssetsV1 is deprecated, use SyncRequestType.PartnerAssetsV2 instead","messagePattern":"SyncRequestType\\.PartnerAssetsV1 is deprecated, use SyncRequestType\\.PartnerAssetsV2 instead","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"server/src/services/sync.service.ts","lineNumber":296,"sourceCode":"    throw new BadRequestException('SyncRequestType.AssetsV1 is deprecated, use SyncRequestType.AssetsV2 instead');\n  }\n\n  private async syncAssetsV2(options: SyncQueryOptions, response: Writable, checkpointMap: CheckpointMap) {\n    const deleteType = SyncEntityType.AssetDeleteV1;\n    const deletes = this.syncRepository.asset.getDeletes({ ...options, ack: checkpointMap[deleteType] });\n    for await (const { id, ...data } of deletes) {\n      send(response, { type: deleteType, ids: [id], data });\n    }\n\n    const upsertType = SyncEntityType.AssetV2;\n    const upserts = this.syncRepository.asset.getUpserts({ ...options, ack: checkpointMap[upsertType] });\n    for await (const { updateId, ...data } of upserts) {\n      send(response, { type: upsertType, ids: [updateId], data: mapSyncAssetV2(data) });\n    }\n  }\n\n  private syncPartnerAssetsV1(): Promise<void> {\n    throw new BadRequestException(\n      'SyncRequestType.PartnerAssetsV1 is deprecated, use SyncRequestType.PartnerAssetsV2 instead',\n    );\n  }\n\n  private async syncPartnerAssetsV2(\n    options: SyncQueryOptions,\n    response: Writable,\n    checkpointMap: CheckpointMap,\n    sessionId: string,\n  ) {\n    const deleteType = SyncEntityType.PartnerAssetDeleteV1;\n    const deletes = this.syncRepository.partnerAsset.getDeletes({ ...options, ack: checkpointMap[deleteType] });\n    for await (const { id, ...data } of deletes) {\n      send(response, { type: deleteType, ids: [id], data });\n    }\n\n    const backfillType = SyncEntityType.PartnerAssetBackfillV2;\n    const backfillCheckpoint = checkpointMap[backfillType];","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/immich-app/immich/blob/199723261c6ffa897fec8ccdaea6359e39c37cc3/server/src/services/sync.service.ts#L278-L314","documentation":"Thrown (as BadRequestException) by SyncService.syncPartnerAssetsV1, a stub that always rejects. PartnerAssetsV1 was superseded by PartnerAssetsV2 and the old stream is intentionally disabled.","triggerScenarios":"GET /sync/stream whose SyncRequestType array contains SyncRequestType.PartnerAssetsV1.","commonSituations":"Client predating the V2 split still asks for PartnerAssetsV1; test suite references the removed constant.","solutions":["Switch the client request from SyncRequestType.PartnerAssetsV1 to SyncRequestType.PartnerAssetsV2.","Upgrade the client app to the version aligned with the server.","Regenerate the typed SDK from current openapi and remove references to the V1 type."],"exampleFix":"// before\ntypes: [SyncRequestType.PartnerAssetsV1]\n// after\ntypes: [SyncRequestType.PartnerAssetsV2]","handlingStrategy":"validation","validationCode":"const types = clientTypes.filter(t => t !== SyncRequestType.PartnerAssetsV1);\ntypes.push(SyncRequestType.PartnerAssetsV2);\nawait syncApi.stream({ types });","typeGuard":"function requestsPartnerAssetsV1(types: SyncRequestType[]): boolean {\n  return types.includes(SyncRequestType.PartnerAssetsV1);\n}","tryCatchPattern":null,"preventionTips":["Eliminate V1 partner-asset requests from the client.","Regenerate SDK after upgrade; remove deprecated enum members.","Add a client-side deprecation lint rule for SyncRequestType members ending in 'V1'."],"tags":["sync","deprecation","version-skew","bad-request"],"backgroundTag":null,"analyzedSha":"199723261c6ffa897fec8ccdaea6359e39c37cc3","analyzedAt":"2026-08-12T04:54:27.085Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}