{"record":{"id":"57e56c6fb506cc95","repo":"OtterMind/Chat2DB","slug":"file-type-unsupported-57e56c","errorCode":"file.type.unsupported","errorMessage":"file.type.unsupported","messagePattern":"file\\.type\\.unsupported","errorType":"exception","errorClass":"BusinessException","httpStatus":null,"severity":"error","filePath":"chat2db-community-server/chat2db-community-domain/chat2db-community-domain-api/src/main/java/ai/chat2db/community/domain/api/service/file/IUploadFileService.java","lineNumber":20,"sourceCode":"\nimport ai.chat2db.community.domain.api.enums.file.ConfigFileTypeEnum;\nimport ai.chat2db.community.tools.exception.BusinessException;\n\nimport java.io.File;\nimport java.io.IOException;\n\n/**\n * Handles uploaded file metadata and temporary storage.\n */\npublic interface IUploadFileService<T> {\n\n    String extension(T file);\n\n    File transferToTempFile(T file) throws IOException;\n\n    default File transferToTempFile(T file, ConfigFileTypeEnum expectedType) {\n        if (expectedType != null && !expectedType.name().equalsIgnoreCase(extension(file))) {\n            throw new BusinessException(\"file.type.unsupported\");\n        }\n        return transferToTempFileOrThrow(file);\n    }\n\n    default File transferToTempFileOrThrow(T file) {\n        try {\n            return transferToTempFile(file);\n        } catch (IOException e) {\n            throw new BusinessException(\"file.upload.failed\", new Object[]{e.getMessage()}, e);\n        }\n    }\n}\n","sourceCodeStart":2,"sourceCodeEnd":33,"githubUrl":"https://github.com/OtterMind/Chat2DB/blob/5ee1e990e73fbcae1969dc554be254fedb3ab888/chat2db-community-server/chat2db-community-domain/chat2db-community-domain-api/src/main/java/ai/chat2db/community/domain/api/service/file/IUploadFileService.java#L2-L33","documentation":"Error \"file.type.unsupported\" thrown in OtterMind/Chat2DB.","triggerScenarios":"The upload endpoint received a file whose type is not in the supported list.","commonSituations":"See trigger scenarios.","solutions":["Upload a file with an extension accepted by the upload service.","Check the allowed file types for this endpoint and convert the file if needed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ee1e990e73fbcae1969dc554be254fedb3ab888","analyzedAt":"2026-08-14T07:05:03.077Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}