---
name: "Bot error notifications for story failures (with shared messaging)"
---

# Story 262: Bot error notifications for story failures

## User Story

As a user, I want to receive bot notifications with an error icon in the channel whenever a story errors out (e.g. merge failure), so that I'm immediately aware of problems.

## Design Constraint

Story 261 adds stage-transition notifications using the same Matrix messaging path. Extract a shared utility/module for sending Matrix messages so that both error notifications (this story) and stage-transition notifications (261) use the same code path. Do not duplicate Matrix message-sending logic.

## Acceptance Criteria

- [ ] Bot sends an error notification to the channel when a story encounters a failure (e.g. merge failure)
- [ ] Notification includes an error icon to distinguish it from normal stage-transition notifications
- [ ] Notification includes the story number, name, and a description of the error
- [ ] Matrix message-sending logic is in a shared module usable by both error and stage-transition notifications

## Out of Scope

- Stage-transition notifications (covered by story 261)
