{"record":{"id":"898b3d7c2771f595","repo":"conductor-oss/conductor","slug":"file-not-found","errorCode":null,"errorMessage":"File not found: {}","messagePattern":"File not found: (.+?)","errorType":"exception","errorClass":"NotFoundException","httpStatus":404,"severity":"error","filePath":"core/src/main/java/org/conductoross/conductor/core/storage/FileStorageServiceImpl.java","lineNumber":254,"sourceCode":"\n    /** Downloads and metadata are visible to the owning workflow's full workflow family. */\n    private @NonNull FileModel getFamilyAccessibleFile(String workflowId, String fileId) {\n        FileModel model = getFileModelOrThrow(fileId);\n        if (model.getWorkflowId() == null || model.getWorkflowId().isBlank()) {\n            throw new AccessForbiddenException(\"File has no workflowId: \" + fileId);\n        }\n\n        Set<String> family = workflowFamilyResolver.getFamily(workflowId);\n        if (!family.contains(model.getWorkflowId())) {\n            throw new AccessForbiddenException(\"Workflow cannot access file: \" + fileId);\n        }\n        return model;\n    }\n\n    private FileModel getFileModelOrThrow(String fileId) {\n        FileModel model = fileMetadataDAO.getFileMetadata(fileId);\n        if (model == null) {\n            throw new NotFoundException(\"File not found: \" + fileId);\n        }\n        return model;\n    }\n}\n","sourceCodeStart":236,"sourceCodeEnd":259,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/org/conductoross/conductor/core/storage/FileStorageServiceImpl.java#L236-L259","documentation":"Thrown by getFileModelOrThrow when fileMetadataDAO.getFileMetadata returns null for the given fileId. No file record exists for that id, so any file operation is rejected. Raised as NotFoundException (HTTP 404). This is the root lookup failure underlying all file endpoints.","triggerScenarios":"Any file endpoint called with a fileId that was never created, was deleted, or is malformed. E.g. getDownloadUrl/confirmUpload/uploadContent/downloadContent/getFileMetadata with an unknown fileId.","commonSituations":"Stale/truncated fileId; file was deleted; wrong environment/cluster; typo; using a fileHandleId where a fileId is expected (note the FileIdToFileHandleIdConverter mapping).","solutions":["Verify the fileId is complete and was returned by a prior createFile call.","Confirm the file was not deleted in the target environment.","Ensure you are not passing a fileHandleId where the raw fileId is required (check converter semantics).","List/search file metadata to locate the correct id."],"exampleFix":"// before - using a stale/wrong id\nfileStorageService.getDownloadUrl(wfId, \"abc\"); // 404\n\n// after - use the id returned at creation\nFileUploadResponse r = fileStorageService.createFile(req);\nfileStorageService.getDownloadUrl(wfId, r.getFileId());","handlingStrategy":"validation","validationCode":"FileModel model = fileMetadataDAO.getFileMetadata(fileId);\nif (model == null) { /* do not call file endpoints */ }","typeGuard":null,"tryCatchPattern":"try {\n    fileStorageService.getDownloadUrl(wfId, fileId);\n} catch (NotFoundException e) {\n    // no such file record\n}","preventionTips":["Use the fileId returned by createFile","Do not confuse fileId with fileHandleId","Confirm the file exists in the target environment"],"tags":["file-storage","not-found","conductor","java"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}