{"record":{"id":"abd92ad99c7776af","repo":"AlistGo/alist","slug":"unsupported-lark-method-s","errorCode":null,"errorMessage":"unsupported lark method: %s","messagePattern":"unsupported lark method: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/lark/other.go","lineNumber":96,"sourceCode":"\nfunc (c *Lark) Other(ctx context.Context, args model.OtherArgs) (interface{}, error) {\n\tswitch strings.ToLower(strings.TrimSpace(args.Method)) {\n\tcase larkExportOptionsMethod:\n\t\treturn c.getExportOptions(ctx, args.Obj)\n\tcase larkExportCreateMethod:\n\t\tvar req larkExportCreateReq\n\t\tif err := decodeOtherData(args.Data, &req); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn c.createExportTask(ctx, args.Obj, req)\n\tcase larkExportStatusMethod:\n\t\tvar req larkExportStatusReq\n\t\tif err := decodeOtherData(args.Data, &req); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn c.getExportTask(ctx, args.Obj, req)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported lark method: %s\", args.Method)\n\t}\n}\n\nfunc decodeOtherData(data interface{}, v interface{}) error {\n\tb, err := json.Marshal(data)\n\tif err != nil {\n\t\treturn errors.WithMessage(err, \"failed to encode request data\")\n\t}\n\tif err = json.Unmarshal(b, v); err != nil {\n\t\treturn errors.WithMessage(err, \"failed to decode request data\")\n\t}\n\treturn nil\n}\n\nfunc (c *Lark) createExportTask(ctx context.Context, obj model.Obj, req larkExportCreateReq) (*LarkExportCreateResp, error) {\n\ttoken, ok := c.getObjToken(ctx, obj.GetPath())\n\tif !ok {\n\t\treturn nil, errors.WithStack(errors.New(\"lark file token not found\"))","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/lark/other.go#L78-L114","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nresp, err := fs.Other(ctx, &fs.OtherArgs{Method: \"export\", Obj: obj})\n// after\nresp, err := fs.Other(ctx, &fs.OtherArgs{Method: \"lark_export_create\", Obj: obj, Data: req})","handlingStrategy":"validation","validationCode":"var larkMethods = map[string]bool{\"lark_export_create\": true, \"lark_export_status\": true /* keep in sync with other.go */}\nif !larkMethods[strings.TrimSpace(method)] {\n    return fmt.Errorf(\"rejecting unknown method %q before dispatch\", method)\n}","typeGuard":"func isSupportedLarkMethod(m string) bool {\n    switch strings.TrimSpace(m) {\n    case larkExportCreateMethod, larkExportStatusMethod:\n        return true\n    }\n    return false\n}","tryCatchPattern":"if err != nil && strings.HasPrefix(err.Error(), \"unsupported lark method\") {\n    // caller bug: log method name and fix the caller, never retry\n    log.Printf(\"bad lark method %q\", method)\n}","preventionTips":["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."],"tags":["lark","feishu","api-misuse","dispatch","go"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}