--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 摘要。