{"record":{"id":"14f449bc0e8e09ac","repo":"immich-app/immich","slug":"invalid-job-name","errorCode":null,"errorMessage":"Invalid job name","messagePattern":"Invalid job name","errorType":"http","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"server/src/services/job.service.ts","lineNumber":74,"sourceCode":"\n    case ManualJobName.IntegrityChecksumFilesRefresh: {\n      return { name: JobName.IntegrityChecksumFiles, data: { refreshOnly: true } };\n    }\n\n    case ManualJobName.IntegrityMissingFilesDeleteAll: {\n      return { name: JobName.IntegrityDeleteReportType, data: { type: IntegrityReport.MissingFile } };\n    }\n\n    case ManualJobName.IntegrityUntrackedFilesDeleteAll: {\n      return { name: JobName.IntegrityDeleteReportType, data: { type: IntegrityReport.UntrackedFile } };\n    }\n\n    case ManualJobName.IntegrityChecksumFilesDeleteAll: {\n      return { name: JobName.IntegrityDeleteReportType, data: { type: IntegrityReport.ChecksumFail } };\n    }\n\n    default: {\n      throw new BadRequestException('Invalid job name');\n    }\n  }\n};\n\n@Injectable()\nexport class JobService extends BaseService {\n  async create(dto: JobCreateDto): Promise<void> {\n    await this.jobRepository.queue(asJobItem(dto));\n  }\n\n  @OnEvent({ name: 'JobRun' })\n  async onJobRun(...[queueName, job]: ArgsOf<'JobRun'>) {\n    try {\n      await this.eventRepository.emit('JobStart', queueName, job);\n      const response = await this.jobRepository.run(job);\n      await this.eventRepository.emit('JobSuccess', { job, response });\n      if (response && typeof response === 'string' && [JobStatus.Success, JobStatus.Skipped].includes(response)) {\n        await this.onDone(job);","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/immich-app/immich/blob/e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c/server/src/services/job.service.ts#L56-L92","documentation":"asJobItem is a switch over ManualJobName values that maps each manual job handle to a concrete JobName plus payload; the default branch throws this error when a caller passes a manual-job identifier that has no case in the switch. It fires whenever a new ManualJobName enum member is added without extending the mapping, or when a stale/unknown string is submitted through the create flow, so it signals a programming/migration gap rather than user input problems.","triggerScenarios":"Thrown at server/src/services/job.service.ts:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a case for the unrecognized ManualJobName in asJobItem mapping it to the correct JobName and data payload","Verify the client/API is sending a ManualJobName value that exists in the current enum version","Check for enum drift between the API version receiving the request and the server code handling it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}