Skip to content

Commit f3934e6

Browse files
committed
fix: Recipient type check and error message
1 parent 69a2fd3 commit f3934e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

alerting/provider/threemagateway/threemagateway.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ func (cfg *Config) Validate() error {
6565
if err := recipient.Validate(); err != nil {
6666
return fmt.Errorf("recipients: %s: %w", recipient.Value, err)
6767
}
68-
if modeType != ModeTypeBasic && recipient.Type == RecipientTypeId {
69-
return errors.New("recipient type 'id' is only supported in 'basic' mode") // TODO#1464: Maybe add support to fetch and cache IDs in other modes
68+
if modeType != ModeTypeBasic && recipient.Type != RecipientTypeId {
69+
return fmt.Errorf("recipients: only 'id' recipient type is supported in '%s' mode", cfg.Mode.Value)
7070
}
7171
}
7272

0 commit comments

Comments
 (0)