{"record":{"id":"65b36c1fed32ba87","repo":"AlistGo/alist","slug":"lark-export-download-response-missing-file","errorCode":null,"errorMessage":"lark export download response missing file","messagePattern":"lark export download response missing file","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/lark/other.go","lineNumber":245,"sourceCode":"}\n\nfunc (c *Lark) DownloadExportFile(ctx context.Context, fileToken string) (io.Reader, string, error) {\n\tfileToken = strings.TrimSpace(fileToken)\n\tif fileToken == \"\" {\n\t\treturn nil, \"\", errors.New(\"file_token is required\")\n\t}\n\tresp, err := doDrive(ctx, c, func(opts ...larkcore.RequestOptionFunc) (*larkdrive.DownloadExportTaskResp, error) {\n\t\treturn c.client.Drive.V1.ExportTask.Download(ctx,\n\t\t\tlarkdrive.NewDownloadExportTaskReqBuilder().FileToken(fileToken).Build(), opts...)\n\t})\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tif !resp.Success() {\n\t\treturn nil, \"\", larkAPIError(resp)\n\t}\n\tif resp.File == nil {\n\t\treturn nil, \"\", errors.New(\"lark export download response missing file\")\n\t}\n\treturn resp.File, resp.FileName, nil\n}\n\nfunc larkExportType(name string) (string, error) {\n\tswitch {\n\tcase strings.HasSuffix(name, \".lark-doc\"):\n\t\treturn larkdrive.TypeDoc, nil\n\tcase strings.HasSuffix(name, \".lark-docx\"):\n\t\treturn larkdrive.TypeDocx, nil\n\tcase strings.HasSuffix(name, \".lark-sheet\"):\n\t\treturn larkdrive.TypeSheet, nil\n\tcase strings.HasSuffix(name, \".lark-bitable\"):\n\t\treturn larkdrive.TypeBitable, nil\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"unsupported lark export file type: %s\", name)\n\t}\n}","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/lark/other.go#L227-L263","documentation":"Guard in DownloadExportFile: the export-download API succeeded but the response carries no file payload, so there is no exported content stream to return. Fires when an export result exists but the downloadable artifact is missing.","triggerScenarios":"Thrown at drivers/lark/other.go:245 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the referenced file/path/ID exists and is correct, then retry the operation."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","contentChangedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}