Commit ad6e6bf
committed
fix(auth): surface 'No token' dispatch failure as AuthError::NoToken
When a session expires mid-chat, the AWS SDK returns a dispatch failure
with 'No token' in the error chain. This was converted to ChatError::Client
and displayed as an opaque multi-line error instead of the clear
'Your session has expired. Run q login' message.
Add is_no_token_error() to walk the error source chain and detect this
case, converting it to ChatError::Auth(AuthError::NoToken) so the
existing handler in handle_chat_error displays the actionable message.
Fixes #31731 parent e14ea18 commit ad6e6bf
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
627 | 634 | | |
628 | 635 | | |
629 | 636 | | |
630 | 637 | | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
631 | 652 | | |
632 | 653 | | |
633 | 654 | | |
| |||
0 commit comments