AlistGo/alist · error
unsupported lark method: %s
Error message
unsupported lark method: %s
What it means
Dispatch error in the Lark (Feishu) driver's Other method routing. args.Method is compared against known methods (export create, export status, ...); anything else falls through to the default branch and returns 'unsupported lark method: %s'. It is a programmer/caller error, not a runtime/network failure.
Source
Thrown at drivers/lark/other.go:96
func (c *Lark) Other(ctx context.Context, args model.OtherArgs) (interface{}, error) {
switch strings.ToLower(strings.TrimSpace(args.Method)) {
case larkExportOptionsMethod:
return c.getExportOptions(ctx, args.Obj)
case larkExportCreateMethod:
var req larkExportCreateReq
if err := decodeOtherData(args.Data, &req); err != nil {
return nil, err
}
return c.createExportTask(ctx, args.Obj, req)
case larkExportStatusMethod:
var req larkExportStatusReq
if err := decodeOtherData(args.Data, &req); err != nil {
return nil, err
}
return c.getExportTask(ctx, args.Obj, req)
default:
return nil, fmt.Errorf("unsupported lark method: %s", args.Method)
}
}
func decodeOtherData(data interface{}, v interface{}) error {
b, err := json.Marshal(data)
if err != nil {
return errors.WithMessage(err, "failed to encode request data")
}
if err = json.Unmarshal(b, v); err != nil {
return errors.WithMessage(err, "failed to decode request data")
}
return nil
}
func (c *Lark) createExportTask(ctx context.Context, obj model.Obj, req larkExportCreateReq) (*LarkExportCreateResp, error) {
token, ok := c.getObjToken(ctx, obj.GetPath())
if !ok {
return nil, errors.WithStack(errors.New("lark file token not found"))View on GitHub (pinned to 843d9dc814)
Solutions
- Check the method constants (larkExportCreateMethod, larkExportStatusMethod, etc.) in drivers/lark/other.go and use exactly one of those strings.
- Strip/normalize whitespace and fix casing before calling.
- Upgrade OpenList — the method you need may have been added in a newer release.
- If the method is genuinely missing, file an issue or implement a new case in the switch.
Example fix
// before
resp, err := fs.Other(ctx, &fs.OtherArgs{Method: "export", Obj: obj})
// after
resp, err := fs.Other(ctx, &fs.OtherArgs{Method: "lark_export_create", Obj: obj, Data: req}) Defensive patterns
Strategy: validation
Validate before calling
var larkMethods = map[string]bool{"lark_export_create": true, "lark_export_status": true /* keep in sync with other.go */}
if !larkMethods[strings.TrimSpace(method)] {
return fmt.Errorf("rejecting unknown method %q before dispatch", method)
} Type guard
func isSupportedLarkMethod(m string) bool {
switch strings.TrimSpace(m) {
case larkExportCreateMethod, larkExportStatusMethod:
return true
}
return false
} Try / catch
if err != nil && strings.HasPrefix(err.Error(), "unsupported lark method") {
// caller bug: log method name and fix the caller, never retry
log.Printf("bad lark method %q", method)
} Prevention
- Define method names as constants and reference them, never inline strings.
- Add the known-methods check at the API boundary before hitting the driver.
- Upgrade OpenList before using newly documented Other methods.
When it happens
Trigger: Calling the driver's Other API (e.g. via /api/fs/other with a custom method) with a method string not in the switch: typos like 'export_creat', methods that belong to a different driver, or new methods not yet implemented by this driver version.
Common situations: Frontend or script sends a method name this OpenList build does not support (older build), a copy-paste of a Google/Dropbox-style method name into a lark storage, or trailing whitespace/case mismatch in the method string.
Related errors
- unsupported export format %q for lark type %q
- sub_id is required when exporting lark type %q as %q
- unsupported lark export file type: %s
- lark refresh token expired
- lark refresh token response missing access token
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/abd92ad99c7776af.
Report an issue: GitHub.