OtterMind/Chat2DB · error · BusinessException

file.type.unsupported

file.type.unsupported

Error message

file.type.unsupported

What it means

Error "file.type.unsupported" thrown in OtterMind/Chat2DB.

Source

Thrown at chat2db-community-server/chat2db-community-domain/chat2db-community-domain-api/src/main/java/ai/chat2db/community/domain/api/service/file/IUploadFileService.java:20

import ai.chat2db.community.domain.api.enums.file.ConfigFileTypeEnum;
import ai.chat2db.community.tools.exception.BusinessException;

import java.io.File;
import java.io.IOException;

/**
 * Handles uploaded file metadata and temporary storage.
 */
public interface IUploadFileService<T> {

    String extension(T file);

    File transferToTempFile(T file) throws IOException;

    default File transferToTempFile(T file, ConfigFileTypeEnum expectedType) {
        if (expectedType != null && !expectedType.name().equalsIgnoreCase(extension(file))) {
            throw new BusinessException("file.type.unsupported");
        }
        return transferToTempFileOrThrow(file);
    }

    default File transferToTempFileOrThrow(T file) {
        try {
            return transferToTempFile(file);
        } catch (IOException e) {
            throw new BusinessException("file.upload.failed", new Object[]{e.getMessage()}, e);
        }
    }
}

View on GitHub (pinned to 5ee1e990e7)

Solutions

  1. Upload a file with an extension accepted by the upload service.
  2. Check the allowed file types for this endpoint and convert the file if needed.

When it happens

Trigger: The upload endpoint received a file whose type is not in the supported list.

Common situations: See trigger scenarios.


AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14). Data as JSON: /api/errors/57e56c6fb506cc95. Report an issue: GitHub.