{"record":{"id":"004b29393dd69bf5","repo":"immich-app/immich","slug":"syncrequesttype-albumassetsv1-is-deprecated-use-s","errorCode":null,"errorMessage":"SyncRequestType.AlbumAssetsV1 is deprecated, use SyncRequestType.AlbumAssetsV2 instead","messagePattern":"SyncRequestType\\.AlbumAssetsV1 is deprecated, use SyncRequestType\\.AlbumAssetsV2 instead","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"server/src/services/sync.service.ts","lineNumber":524,"sourceCode":"\n        sendEntityBackfillCompleteAck(response, backfillType, createId);\n      }\n    } else if (albums.length > 0) {\n      await this.upsertBackfillCheckpoint({\n        type: backfillType,\n        sessionId,\n        createId: albums.at(-1)!.createId,\n      });\n    }\n\n    const upserts = this.syncRepository.albumUser.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 syncAlbumAssetsV1(): Promise<void> {\n    throw new BadRequestException(\n      'SyncRequestType.AlbumAssetsV1 is deprecated, use SyncRequestType.AlbumAssetsV2 instead',\n    );\n  }\n\n  private async syncAlbumAssetsV2(\n    options: SyncQueryOptions,\n    response: Writable,\n    checkpointMap: CheckpointMap,\n    sessionId: string,\n  ) {\n    const backfillType = SyncEntityType.AlbumAssetBackfillV2;\n    const backfillCheckpoint = checkpointMap[backfillType];\n    const albums = await this.syncRepository.album.getCreatedAfter({\n      ...options,\n      afterCreateId: backfillCheckpoint?.updateId,\n    });\n    const updateType = SyncEntityType.AlbumAssetUpdateV2;\n    const createType = SyncEntityType.AlbumAssetCreateV2;","sourceCodeStart":506,"sourceCodeEnd":542,"githubUrl":"https://github.com/immich-app/immich/blob/199723261c6ffa897fec8ccdaea6359e39c37cc3/server/src/services/sync.service.ts#L506-L542","documentation":"Thrown (as BadRequestException) by SyncService.syncAlbumAssetsV1, a stub that always rejects. AlbumAssetsV1 is replaced by AlbumAssetsV2 (which includes the AlbumAssetBackfillV2 flow) and the old stream is disabled.","triggerScenarios":"GET /sync/stream whose SyncRequestType array includes SyncRequestType.AlbumAssetsV1.","commonSituations":"Stale client still emitting AlbumAssetsV1 after server upgrade; SDK not regenerated.","solutions":["Replace SyncRequestType.AlbumAssetsV1 with SyncRequestType.AlbumAssetsV2 in the requested types.","Upgrade the client release and regenerate SDK from current openapi.","Clear cached sync preferences that pin the V1 type."],"exampleFix":"// before\ntypes: [SyncRequestType.AlbumAssetsV1]\n// after\ntypes: [SyncRequestType.AlbumAssetsV2]","handlingStrategy":"validation","validationCode":"const types = clientTypes.filter(t => t !== SyncRequestType.AlbumAssetsV1);\ntypes.push(SyncRequestType.AlbumAssetsV2);\nawait syncApi.stream({ types });","typeGuard":"function requestsAlbumAssetsV1(types: SyncRequestType[]): boolean {\n  return types.includes(SyncRequestType.AlbumAssetsV1);\n}","tryCatchPattern":null,"preventionTips":["Strip AlbumAssetsV1 from request arrays before sending.","Keep SDK and server version aligned.","Track the V2 backfill checkpoint (AlbumAssetBackfillV2) when migrating."],"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"}