{"record":{"id":"068ca82e9c3474c4","repo":"immich-app/immich","slug":"withpartners-is-only-supported-for-non-archived-n","errorCode":null,"errorMessage":"withPartners is only supported for non-archived, non-trashed, non-favorited, non-locked assets","messagePattern":"withPartners is only supported for non-archived, non-trashed, non-favorited, non-locked assets","errorType":"validation","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"server/src/services/timeline.service.ts","lineNumber":83,"sourceCode":"      }\n    }\n\n    if (dto.tagId) {\n      await this.requireAccess({ auth, permission: Permission.TagRead, ids: [dto.tagId] });\n    }\n\n    if (auth.sharedLink && !auth.sharedLink.showExif) {\n      dto.withCoordinates = false;\n    }\n\n    if (dto.withPartners) {\n      const isRequestedLocked = dto.visibility === AssetVisibility.Locked;\n      const isRequestedArchived = dto.visibility === AssetVisibility.Archive || dto.visibility === undefined;\n      const isRequestedFavorite = dto.isFavorite === true || dto.isFavorite === false;\n      const isRequestedTrash = dto.isTrashed === true;\n\n      if (isRequestedLocked || isRequestedArchived || isRequestedFavorite || isRequestedTrash) {\n        throw new BadRequestException(\n          'withPartners is only supported for non-archived, non-trashed, non-favorited, non-locked assets',\n        );\n      }\n    }\n  }\n}\n","sourceCodeStart":65,"sourceCodeEnd":90,"githubUrl":"https://github.com/immich-app/immich/blob/e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c/server/src/services/timeline.service.ts#L65-L90","documentation":"Thrown by TimelineService.timeBucketChecks when dto.withPartners is combined with restricted visibility/favorite/trash filters. Partner timelines are only computed for the base, all-assets view; filtering them by archive, trash, favorite, or locked state is unsupported. It is a 400 BadRequest for an unsupported filter combination.","triggerScenarios":"GET /api/timeline/buckets?withPartners=true together with any of: visibility=locked, visibility=archive or omitted (defaults to archived), isFavorite=true or false, isTrashed=true. All of these trigger the error.","commonSituations":"Reusing a generic timeline query builder that always sets withPartners=true while also carrying archive/trash filters; UI toggle for partner photos left on while browsing the trash or archive sections.","solutions":["Omit withPartners when querying trash, archive, favorites, or locked visibility","Set visibility/isFavorite/isTrashed to values outside the restricted set (e.g. isFavorite undefined, isTrashed false, visibility not Archive/undefined/Locked)","Fetch partner assets in a separate request without the restricted filters"],"exampleFix":"// before\nawait api.getTimeBuckets({ withPartners: true, isTrashed: true });\n// after\nawait api.getTimeBuckets({ withPartners: true });\nconst trashed = await api.getTimeBuckets({ isTrashed: true });","handlingStrategy":"validation","validationCode":"const restricted =\n  visibility === 'locked' || visibility === 'archive' || visibility === undefined ||\n  isFavorite === true || isFavorite === false || isTrashed === true;\nif (withPartners && restricted) {\n  throw new Error('withPartners cannot be combined with archive/trash/favorite/locked filters');\n}","typeGuard":null,"tryCatchPattern":"try { await api.getTimeBuckets(params); } catch (e) {\n  if (e.response?.status === 400 && /withPartners/.test(e.response?.data?.message ?? '')) {\n    const { withPartners, ...rest } = params;\n    return api.getTimeBuckets(rest); // retry without withPartners\n  }\n  throw e;\n}","preventionTips":["Only set withPartners on the all-assets base view","Centralize timeline query building so filters and withPartners are validated together","Drop withPartners automatically when isTrashed/isFavorite/visibility filters are present"],"tags":["unsupported-combination","filters"],"backgroundTag":"mutually-exclusive-options","analyzedSha":"e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c","analyzedAt":"2026-09-15T07:20:19.675Z","contentChangedAt":"2026-09-15T07:20:19.675Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}