unopim/unopim · error · InvalidArgumentException

Unsupported file type: $fileType

Error message

Unsupported file type: $fileType

What it means

Error "Unsupported file type: $fileType" thrown in unopim/unopim.

Source

Thrown at packages/Webkul/DataTransfer/src/Helpers/Import.php:668

            case 'csv':
                $writer = new Csv($spreadsheet);

                $writer->setDelimiter($this->import->field_separator);

                break;

            case 'xls':
                $writer = new Xls($spreadsheet);

                break;

            case 'xlsx':
                $writer = new Xlsx($spreadsheet);

                break;

            default:
                throw new \InvalidArgumentException("Unsupported file type: $fileType");
        }
        $errorFilePath = 'imports/'.time().'-error-report.'.$fileType;

        $writer->save(Storage::disk('private')->path($errorFilePath));

        return $errorFilePath;
    }

    /**
     * Validates source file and returns validation result
     */
    public function getTypeImporter(): AbstractImporter
    {
        $jobInstance = $this->import->jobInstance;

        if (! $this->typeImporter) {
            $entityType = $this->resolveEntityType($jobInstance->entity_type);
            $importerConfig = config('importers.'.$entityType);

View on GitHub (pinned to c27a402253)

When it happens

Trigger: Thrown at packages/Webkul/DataTransfer/src/Helpers/Import.php:668 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of unopim/unopim@c27a402253 (2026-08-21). Data as JSON: /api/errors/73e7a17bae82786d. Report an issue: GitHub.