Skip to content

--idempotency-key 超 50 字符时错误信息不包含字段名和原因 #1774

Description

@yky95

版本

lark-cli version 1.0.65

复现命令

lark-cli im +messages-send --chat-id oc_xxx --text "hello"
--idempotency-key "$(python3 -c 'print("a"*51)')"

实际输出

{
"code": 99992402,
"message": "field validation failed"
}

期望行为

错误信息应包含具体字段名和限制,例如:
"--idempotency-key must be at most 50 characters, got 51"

影响

AI 或自动化脚本无法从 "field validation failed" 推断出是哪个参数超限,
只能靠猜测或查文档,修复效率很低。

建议

对已知参数(如 idempotency-key 最大 50 字符)在客户端做预校验,返回字段名和具体原因。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain/imPR touches the im domain

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions