notify: a failed Mattermost delivery's error names Mattermost (closes #227)
check / check (push) Canceled after 0s
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:
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user