{"record":{"id":"edf573b9ddccdb1d","repo":"krayin/laravel-crm","slug":"unsupported-file-type-filetype","errorCode":null,"errorMessage":"Unsupported file type: $fileType","messagePattern":"Unsupported file type: \\$fileType","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"packages/Webkul/DataTransfer/src/Helpers/Import.php","lineNumber":524,"sourceCode":"\n        switch ($fileType) {\n            case 'csv':\n                $writer = new Csv($spreadsheet);\n\n                $writer->setDelimiter($this->import->field_separator);\n\n                break;\n\n            case 'xls':\n                $writer = new Xls($spreadsheet);\n\n            case 'xlsx':\n                $writer = new Xlsx($spreadsheet);\n\n                break;\n\n            default:\n                throw new \\InvalidArgumentException(\"Unsupported file type: $fileType\");\n        }\n\n        $errorFilePath = 'imports/'.time().'-error-report.'.$fileType;\n\n        $writer->save(Storage::disk('public')->path($errorFilePath));\n\n        return $errorFilePath;\n    }\n\n    /**\n     * Validates source file and returns validation result.\n     */\n    public function getTypeImporter(): AbstractImporter\n    {\n        if (! $this->typeImporter) {\n            $importerConfig = config('importers.'.$this->import->type);\n\n            $this->typeImporter = app()->make($importerConfig['importer'])","sourceCodeStart":506,"sourceCodeEnd":542,"githubUrl":"https://github.com/krayin/laravel-crm/blob/13d6988cda8d69ece45ee1890effc90a7f21cdc1/packages/Webkul/DataTransfer/src/Helpers/Import.php#L506-L542","documentation":"Error \"Unsupported file type: $fileType\" thrown in krayin/laravel-crm.","triggerScenarios":"Thrown at packages/Webkul/DataTransfer/src/Helpers/Import.php:524 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"13d6988cda8d69ece45ee1890effc90a7f21cdc1","analyzedAt":"2026-08-17T00:58:29.000Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}