Ignore no slack connector error during trust center access update

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-12-22 11:38:44 +01:00
parent cf491a2096
commit 504d31af6c
2 changed files with 13 additions and 2 deletions

View File

@@ -33,6 +33,12 @@ const (
slackMessageDeduplicationWindow = 7 * 24 * time.Hour
)
type ErrNoSlackConnector struct{}
func (e ErrNoSlackConnector) Error() string {
return "no slack connector found for organization"
}
type (
SlackMessageService struct {
svc *TenantService
@@ -208,7 +214,7 @@ func (s *SlackMessageService) QueueSlackNotification(
}
if !hasSlackConnector {
return fmt.Errorf("no slack connector found for organization")
return ErrNoSlackConnector{}
}
documents, reports, files, err := s.loadDocumentsReportsAndFilesFromAccesses(ctx, tx, trustCenterAccess.ID)