AlistGo/alist · error
lark export download response missing file
Error message
lark export download response missing file
What it means
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.
Solutions
- Verify the referenced file/path/ID exists and is correct, then retry the operation.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at drivers/lark/other.go:245 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/65b36c1fed32ba87.
Report an issue: GitHub.
Appendix: source
Thrown at drivers/lark/other.go:245
}
func (c *Lark) DownloadExportFile(ctx context.Context, fileToken string) (io.Reader, string, error) {
fileToken = strings.TrimSpace(fileToken)
if fileToken == "" {
return nil, "", errors.New("file_token is required")
}
resp, err := doDrive(ctx, c, func(opts ...larkcore.RequestOptionFunc) (*larkdrive.DownloadExportTaskResp, error) {
return c.client.Drive.V1.ExportTask.Download(ctx,
larkdrive.NewDownloadExportTaskReqBuilder().FileToken(fileToken).Build(), opts...)
})
if err != nil {
return nil, "", err
}
if !resp.Success() {
return nil, "", larkAPIError(resp)
}
if resp.File == nil {
return nil, "", errors.New("lark export download response missing file")
}
return resp.File, resp.FileName, nil
}
func larkExportType(name string) (string, error) {
switch {
case strings.HasSuffix(name, ".lark-doc"):
return larkdrive.TypeDoc, nil
case strings.HasSuffix(name, ".lark-docx"):
return larkdrive.TypeDocx, nil
case strings.HasSuffix(name, ".lark-sheet"):
return larkdrive.TypeSheet, nil
case strings.HasSuffix(name, ".lark-bitable"):
return larkdrive.TypeBitable, nil
default:
return "", fmt.Errorf("unsupported lark export file type: %s", name)
}
}View on GitHub (pinned to 843d9dc814)