Skip to content

Send bot internal error message in case of errors.#545

Merged
alexeykiselev merged 2 commits intomainfrom
send-bot-internal-error-msg
Apr 29, 2026
Merged

Send bot internal error message in case of errors.#545
alexeykiselev merged 2 commits intomainfrom
send-bot-internal-error-msg

Conversation

@nickeskov
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves bot-side observability by emitting “internal error” notifications to the bot chat when message handling or alert rendering fails, so operators can see bot/messaging failures directly in Discord/Telegram.

Changes:

  • Fixes a typo in an alert deserialization error message.
  • On pubsub message handling failures, generates and sends an InternalErrorAlert to the bot.
  • Adds helper methods to send bot internal error messages to Discord/Telegram chats from SendAlertMessage error paths.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
pkg/messaging/alert.go Corrects typo in “insufficient length” error message.
cmd/bots/internal/bots/messaging/pubsub_client.go Sends an internal error alert to the bot when a pubsub message fails to parse/handle.
cmd/bots/internal/bots/environment.go Adds sendErrMsg helpers and uses them to notify chats on alert rendering/sending errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/bots/internal/bots/messaging/pubsub_client.go
Comment thread cmd/bots/internal/bots/environment.go
@alexeykiselev alexeykiselev merged commit 84731f4 into main Apr 29, 2026
18 of 20 checks passed
@alexeykiselev alexeykiselev deleted the send-bot-internal-error-msg branch April 29, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants