notify: a failed Mattermost delivery's error names Mattermost (closes #227)
check / check (push) Canceled after 0s

Mattermost is sent by the Slack sender, which wrapped every HTTP error
status in ErrSlackFailed, so a Mattermost endpoint answering 503 was
logged as "slack notification failed". The sender now takes the error
to wrap: the Slack endpoint passes ErrSlackFailed and the Mattermost
endpoint passes ErrMattermostFailed, which was defined but unused.

A new delivery test sets both endpoints to a stand-in server answering
503 and checks the error logged for each names its own endpoint.

Model: opus-5-5
This commit was merged in pull request #240.
This commit is contained in:
2026-10-02 08:40:19 +02:00
parent ceb24c5004
commit 26c9c74d8e
4 changed files with 82 additions and 7 deletions
+2 -1
View File
@@ -85,10 +85,11 @@ func (svc *Service) SendNtfy(
func (svc *Service) SendSlack(
ctx context.Context,
webhookURL *url.URL,
failed error,
title, message, priority string,
) error {
return svc.sendSlack(
ctx, webhookURL, title, message, priority,
ctx, webhookURL, failed, title, message, priority,
)
}