--debug has no effect; service error name, HTTP status and request ID never reach the terminal
維護者通常 1 天內回覆
評估
- 難度
- 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 內容生成。
描述
Description
--debug is registered as a global flag ("debug logging"), but nothing reads its value, so passing it changes nothing.
- Flag definition:
src/handlers/keys.tsx#L21, registered atsrc/handlers/index.tsx#L71. No non-test code readsDebugKey. - The root error handler prints only
Error: ${error.message}(src/runnable/index.tsx#L55). - For AWS service errors,
AgentCoreCLIError.fromErrorkeeps the error name and$metadata(HTTP status, request ID) inmeta, but these are written only to~/.agentcore/logs/.
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
- Run any command that gets a service error, with
--debug, for example:
agentcore harness get --id doesnotexist0000 --debug - 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:
-
--debugprints error name, HTTP status and request ID for service errors. - Default (non-debug) output is unchanged.
- Or, if
--debugis 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
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
aws/agentcore-cli 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
aws/agentcore-cli#2940 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
aws/agentcore-cli#2939 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 84/100
aws/agentcore-cli#2938 ·
維護者通常 1 天內回覆
-
invoke: CUSTOM_JWT runtime errors discard the response body and error type (e.g. "Token has expired")可能已有人在做 @n1dhruv 於 6 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 82/100
aws/agentcore-cli#2875 · 1 則留言 ·
維護者通常 1 天內回覆
-
`agentcore dev` container fails with LoginTokenLoadError when using `aws login` credentials可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉bug
難度 2/5 1-3 小時 新手友好度 80/100
aws/agentcore-cli#2606 · 4 則留言 ·
維護者通常 1 天內回覆
查看 aws/agentcore-cli 的全部 Issue
相似的 Issue
-
bot:ai-assisted component:faucet status:untriaged
難度 2/5 1-3 小時 新手友好度 78/100
midnightntwrk/midnight-faucet-api#222 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
bluesky-social/social-app#12545 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
knaw-huc/textannoviz#742 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
cloudflare/realtimekit-ui#219 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
cdklabs/cdk-nextjs#365 ·
維護者通常 1 天內回覆