--debug has no effect; service error name, HTTP status and request ID never reach the terminal

未关闭 适合新手
#2,874 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@abhiramshaji-cyber 已经在做这个了。

开始于 2026年11月23日。

  • #2894 来自 @abhiramshaji-cyber —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
aws, typescript
领域
cli

调研方向

从 src/runnable/index.tsx 中的根错误处理器(大约第 55 行)开始,那里只打印 error.message,然后查看 AgentCoreCLIError.fromError,它会为 AWS 服务错误将错误名称和 $metadata 保留在 meta 中。追踪在 src/handlers/keys.tsx#L21 中定义并在 src/handlers/index.tsx#L71 中注册的全局标志如何能到达该处理器,并仅当它被设置时追加名称、状态、request ID 和日志文件路径。当 issue 中的 --debug 示例输出出现,且默认输出逐字节不变时即完成;运行现有的 runnable 和 error 测试以确认。

由索引模型根据 Issue 内容生成。

描述

bug
Description

--debug is registered as a global flag ("debug logging"), but nothing reads its value, so passing it changes nothing.

So when a service call fails, there is no way to see the HTTP status or request ID in the terminal, with or without --debug.

Steps to Reproduce
  1. Run any command that gets a service error, with --debug, for example:
    agentcore harness get --id doesnotexist0000 --debug
  2. Run it again without --debug.
Expected Behavior

Default output stays as it is. With --debug, the error output also includes the error name, HTTP status and request ID (and ideally the path of the log file that has the full entry), for example:

Error: <message>
  name: ResourceNotFoundException  status: 404  requestId: <id>
  details: ~/.agentcore/logs/<file>
Actual Behavior

Both runs print only Error: <message>. The details exist only in the log file.

CLI Version

1.1.0 (same in 1.0.1)

Operating System

Linux

Additional Context

Acceptance:

  • --debug prints error name, HTTP status and request ID for service errors.
  • Default (non-debug) output is unchanged.
  • Or, if --debug is not meant to do this, remove or re-describe the flag so it doesn't advertise "debug logging".
主要语言
TypeScript
星标
339
派生
129
平均合并
19 小时 21 分钟
30 天内合并 PR
125

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aws/agentcore-cli 的其他 Issue

查看 aws/agentcore-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。