mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
notify: Return detailed err msg when connecting to target fails (#16118)
This commit is contained in:
parent
59f877fc64
commit
97eb7dbf5f
@ -22,6 +22,7 @@ import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -59,8 +60,11 @@ func TestSubSysNotificationTargets(ctx context.Context, cfg config.Config, subSy
|
||||
|
||||
for _, target := range targetList {
|
||||
yes, err := target.IsActive()
|
||||
if err != nil || !yes {
|
||||
return ErrTargetsOffline
|
||||
if err == nil && !yes {
|
||||
err = ErrTargetsOffline
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("error (%s): %w", target.ID(), err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user