aws / aws/amazon-q-developer-cli

Improve error handling for token expiration/timeout

Open
#1,215 0 comments 6 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

## Issue Description
When an Amazon Q CLI session times out (which is expected behavior with SSO), the error message is unnecessarily cryptic:

```
Amazon Q is having trouble responding right now:
0: dispatch failure (other): No token
1: dispatch failure
2: other
3: No token

Location:
crates/q_cli/src/cli/chat/mod.rs:668

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
```

## Suggested Improvement
Instead of exposing internal error details, a more user-friendly message would improve the experience:

Related to issue #829 about persistent login, but specifically focused on error handling.

I'm happy to investigate this further and potentially submit a PR if helpful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.