immich-app/immich · error · BadRequestException
SyncRequestType.PartnerAssetsV1 is deprecated, use SyncReque
Error message
SyncRequestType.PartnerAssetsV1 is deprecated, use SyncRequestType.PartnerAssetsV2 instead
What it means
Thrown (as BadRequestException) by SyncService.syncPartnerAssetsV1, a stub that always rejects. PartnerAssetsV1 was superseded by PartnerAssetsV2 and the old stream is intentionally disabled.
Source
Thrown at server/src/services/sync.service.ts:296
throw new BadRequestException('SyncRequestType.AssetsV1 is deprecated, use SyncRequestType.AssetsV2 instead');
}
private async syncAssetsV2(options: SyncQueryOptions, response: Writable, checkpointMap: CheckpointMap) {
const deleteType = SyncEntityType.AssetDeleteV1;
const deletes = this.syncRepository.asset.getDeletes({ ...options, ack: checkpointMap[deleteType] });
for await (const { id, ...data } of deletes) {
send(response, { type: deleteType, ids: [id], data });
}
const upsertType = SyncEntityType.AssetV2;
const upserts = this.syncRepository.asset.getUpserts({ ...options, ack: checkpointMap[upsertType] });
for await (const { updateId, ...data } of upserts) {
send(response, { type: upsertType, ids: [updateId], data: mapSyncAssetV2(data) });
}
}
private syncPartnerAssetsV1(): Promise<void> {
throw new BadRequestException(
'SyncRequestType.PartnerAssetsV1 is deprecated, use SyncRequestType.PartnerAssetsV2 instead',
);
}
private async syncPartnerAssetsV2(
options: SyncQueryOptions,
response: Writable,
checkpointMap: CheckpointMap,
sessionId: string,
) {
const deleteType = SyncEntityType.PartnerAssetDeleteV1;
const deletes = this.syncRepository.partnerAsset.getDeletes({ ...options, ack: checkpointMap[deleteType] });
for await (const { id, ...data } of deletes) {
send(response, { type: deleteType, ids: [id], data });
}
const backfillType = SyncEntityType.PartnerAssetBackfillV2;
const backfillCheckpoint = checkpointMap[backfillType];View on GitHub (pinned to 199723261c)
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.
Example fix
// before types: [SyncRequestType.PartnerAssetsV1] // after types: [SyncRequestType.PartnerAssetsV2]
Defensive patterns
Strategy: validation
Validate before calling
const types = clientTypes.filter(t => t !== SyncRequestType.PartnerAssetsV1);
types.push(SyncRequestType.PartnerAssetsV2);
await syncApi.stream({ types }); Type guard
function requestsPartnerAssetsV1(types: SyncRequestType[]): boolean {
return types.includes(SyncRequestType.PartnerAssetsV1);
} Prevention
- 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'.
When it happens
Trigger: GET /sync/stream whose SyncRequestType array contains SyncRequestType.PartnerAssetsV1.
Common situations: Client predating the V2 split still asks for PartnerAssetsV1; test suite references the removed constant.
Related errors
- SyncRequestType.AssetsV1 is deprecated, use SyncRequestType.
- SyncRequestType.AlbumAssetsV1 is deprecated, use SyncRequest
- SyncRequestType.AssetFacesV1 is deprecated, use SyncRequestT
- Invalid ack type: ${type}
- This endpoint can only be used with a session token
AI-assisted analysis of immich-app/immich@199723261c (2026-08-12).
Data as JSON: /api/errors/ec041ea04fb60e37.
Report an issue: GitHub.