Improve Slack gateway error handling and logging - #778
Closed
aydnOktay wants to merge 1 commit into
Closed
Conversation
teknium1
pushed a commit
that referenced
this pull request
Mar 11, 2026
Replaces all ad-hoc print() calls in the Slack gateway adapter with proper logging.getLogger(__name__) calls, matching the pattern already used by every other platform adapter (telegram, discord, whatsapp, signal, homeassistant). Changes: - Add import logging + module-level logger - Use logger.error for failures, logger.warning for non-critical fallbacks, logger.info for status, logger.debug for routine ops - Add exc_info=True for full stack traces on all error/warning paths - Use %s format strings (lazy evaluation) instead of f-strings - Wrap disconnect() in try/except for safety - Add structured context (file paths, channel IDs, URLs) to log messages - Convert document handling prints added after the original PR Cherry-picked from PR #778 by aydnOktay, rebased onto current main with conflict resolution and extended to cover document/video methods added since the PR was created. Co-authored-by: aydnOktay <xaydinoktay@gmail.com>
Contributor
|
Merged via commit 9149c34 on main. Your commit was cherry-picked with authorship preserved — thanks for the contribution! The PR was 226 commits behind main so it couldn't merge directly, but the changes were cherry-picked and rebased. I also extended the logging conversion to cover the document/video handling methods that were added to slack.py after your PR was created. All 544 gateway tests pass. |
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
Replaces all ad-hoc print() calls in the Slack gateway adapter with proper logging.getLogger(__name__) calls, matching the pattern already used by every other platform adapter (telegram, discord, whatsapp, signal, homeassistant). Changes: - Add import logging + module-level logger - Use logger.error for failures, logger.warning for non-critical fallbacks, logger.info for status, logger.debug for routine ops - Add exc_info=True for full stack traces on all error/warning paths - Use %s format strings (lazy evaluation) instead of f-strings - Wrap disconnect() in try/except for safety - Add structured context (file paths, channel IDs, URLs) to log messages - Convert document handling prints added after the original PR Cherry-picked from PR NousResearch#778 by aydnOktay, rebased onto current main with conflict resolution and extended to cover document/video methods added since the PR was created. Co-authored-by: aydnOktay <xaydinoktay@gmail.com>
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
Replaces all ad-hoc print() calls in the Slack gateway adapter with proper logging.getLogger(__name__) calls, matching the pattern already used by every other platform adapter (telegram, discord, whatsapp, signal, homeassistant). Changes: - Add import logging + module-level logger - Use logger.error for failures, logger.warning for non-critical fallbacks, logger.info for status, logger.debug for routine ops - Add exc_info=True for full stack traces on all error/warning paths - Use %s format strings (lazy evaluation) instead of f-strings - Wrap disconnect() in try/except for safety - Add structured context (file paths, channel IDs, URLs) to log messages - Convert document handling prints added after the original PR Cherry-picked from PR NousResearch#778 by aydnOktay, rebased onto current main with conflict resolution and extended to cover document/video methods added since the PR was created. Co-authored-by: aydnOktay <xaydinoktay@gmail.com>
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
Replaces all ad-hoc print() calls in the Slack gateway adapter with proper logging.getLogger(__name__) calls, matching the pattern already used by every other platform adapter (telegram, discord, whatsapp, signal, homeassistant). Changes: - Add import logging + module-level logger - Use logger.error for failures, logger.warning for non-critical fallbacks, logger.info for status, logger.debug for routine ops - Add exc_info=True for full stack traces on all error/warning paths - Use %s format strings (lazy evaluation) instead of f-strings - Wrap disconnect() in try/except for safety - Add structured context (file paths, channel IDs, URLs) to log messages - Convert document handling prints added after the original PR Cherry-picked from PR NousResearch#778 by aydnOktay, rebased onto current main with conflict resolution and extended to cover document/video methods added since the PR was created. Co-authored-by: aydnOktay <xaydinoktay@gmail.com>
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.
PR improves error handling and logging in the Slack gateway adapter, in the same spirit as the recent Discord and Telegram logging cleanups. It replaces ad-hoc print statements with structured logging calls, adds exc_info=True stack traces for connection, send/edit, file upload, and chat-info failures, and upgrades media caching errors to emit clear warnings instead of silent failures. The external behavior and return types of the adapter remain unchanged, but operators now get much better, production-ready observability for diagnosing Slack integration issues