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

Offen Anfängerfreundlich
#2,874 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@abhiramshaji-cyber arbeitet bereits daran.

Seit 23.11.2026.

  • #2894 von @abhiramshaji-cyber — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
aws, typescript
Bereich
cli

Rechercherichtung

Beginne beim Root-Error-Handler in src/runnable/index.tsx (etwa Zeile 55), wo nur error.message ausgegeben wird, und sieh dir dann AgentCoreCLIError.fromError an, das bei AWS-Servicefehlern den Fehlernamen und $metadata in meta behält. Verfolge, wie das globale Flag, das in src/handlers/keys.tsx#L21 definiert und in src/handlers/index.tsx#L71 registriert ist, diesen Handler erreichen könnte, und hänge Name, Status, Request-ID und den Logdateipfad nur an, wenn es gesetzt ist. Fertig, wenn die --debug-Beispielausgabe aus dem Issue erscheint und die Standardausgabe bytegenau unverändert ist; führe die vorhandenen runnable- und error-Tests aus, um das zu bestätigen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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".
Vorherrschende Sprache
TypeScript
Sterne
339
Forks
129
Ø Merge
19 Std. 21 Min.
Gemergte PRs (30 T.)
125

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus aws/agentcore-cli

Alle Issues in aws/agentcore-cli

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.