{"record":{"id":"1c7635bfac071352","repo":"immich-app/immich","slug":"syncrequesttype-assetsv1-is-deprecated-use-syncre","errorCode":null,"errorMessage":"SyncRequestType.AssetsV1 is deprecated, use SyncRequestType.AssetsV2 instead","messagePattern":"SyncRequestType\\.AssetsV1 is deprecated, use SyncRequestType\\.AssetsV2 instead","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"server/src/services/sync.service.ts","lineNumber":278,"sourceCode":"    }\n  }\n\n  private async syncPartnersV1(options: SyncQueryOptions, response: Writable, checkpointMap: CheckpointMap) {\n    const deleteType = SyncEntityType.PartnerDeleteV1;\n    const deletes = this.syncRepository.partner.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.PartnerV1;\n    const upserts = this.syncRepository.partner.getUpserts({ ...options, ack: checkpointMap[upsertType] });\n    for await (const { updateId, ...data } of upserts) {\n      send(response, { type: upsertType, ids: [updateId], data });\n    }\n  }\n\n  private syncAssetsV1(): Promise<void> {\n    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(","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/immich-app/immich/blob/199723261c6ffa897fec8ccdaea6359e39c37cc3/server/src/services/sync.service.ts#L260-L296","documentation":"Thrown (as BadRequestException) by SyncService.syncAssetsV1, which is now a stub: the AssetsV1 sync stream was removed and unconditionally throws. Clients must request SyncRequestType.AssetsV2. This is a hard deprecation, not a graceful fallback.","triggerScenarios":"GET /sync/stream with a SyncRequestType including SyncRequestType.AssetsV1 in the request types array.","commonSituations":"Old mobile/desktop client built against a pre-V2 server; cached client config still lists AssetsV1; integration test fixtures not updated after upgrade.","solutions":["Remove SyncRequestType.AssetsV1 from the client's requested types and request AssetsV2 instead.","Update the Immich client (mobile/web) to a release that emits AssetsV2.","Regenerate the SDK from the current openapi.json and recompile."],"exampleFix":"// before\ntypes: [SyncRequestType.AssetsV1]\n// after\ntypes: [SyncRequestType.AssetsV2]","handlingStrategy":"validation","validationCode":"const requested = [SyncRequestType.AssetsV1].filter(t => t !== SyncRequestType.AssetsV1);\nrequested.push(SyncRequestType.AssetsV2);\nawait syncApi.stream({ types: requested });","typeGuard":"function isV1AssetRequest(types: SyncRequestType[]): boolean {\n  return types.includes(SyncRequestType.AssetsV1);\n}","tryCatchPattern":null,"preventionTips":["Remove all SyncRequestType.*V1 references from client code.","Gate sync request types behind a generated enum, never hard-coded literals.","Test sync against the same server version you ship."],"tags":["sync","deprecation","version-skew","bad-request"],"backgroundTag":null,"analyzedSha":"199723261c6ffa897fec8ccdaea6359e39c37cc3","analyzedAt":"2026-08-12T04:54:27.085Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}