feat: add User-Agent header to API request debug output#432
Merged
Conversation
Add the User-Agent header to the debug log output for API requests, making it easier to verify CLI version propagation during debugging.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #432 +/- ##
==========================================
- Coverage 70.31% 70.28% -0.04%
==========================================
Files 220 220
Lines 18497 18498 +1
==========================================
- Hits 13006 13001 -5
- Misses 4319 4321 +2
- Partials 1172 1176 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
zimeg
approved these changes
Mar 24, 2026
| expected string | ||
| }{ | ||
| "includes User-Agent header in output": { | ||
| userAgent: "slack-cli/v1.2.3 (os: darwin)", |
Member
Author
|
Thank you, thank you @zimeg! 🙇🏻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
Summary
This pull request outputs the HTTP Request's User-Agent in the
--verbosedebug logs.The motivation is to improve manual testing that requires confirming that the user-agent is set correctly and enrich our log data with more information. Currently, we output the Request URL and Body, so this was a minor addition.
Test Steps
Requirements