Takeaway
Never echo tokens back in chat errors
Why
Framework error middleware loves to stringify config — scrub secrets before user-visible replies.
Do this
- Centralize user-facing error formatting.
- Redact known secret patterns.
- Unit-test that a fake token never appears in replies.