Explorar o código

tech(mailer): improves error when grafana cannot read open cert/key file

ref #6949
bergquist %!s(int64=9) %!d(string=hai) anos
pai
achega
f907330c9e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      pkg/services/notifications/mailer.go

+ 1 - 1
pkg/services/notifications/mailer.go

@@ -94,7 +94,7 @@ func createDialer() (*gomail.Dialer, error) {
 	if setting.Smtp.CertFile != "" {
 		cert, err := tls.LoadX509KeyPair(setting.Smtp.CertFile, setting.Smtp.KeyFile)
 		if err != nil {
-			return nil, err
+			return nil, fmt.Errorf("Could not load cert or key file. error: %v", err)
 		}
 		tlsconfig.Certificates = []tls.Certificate{cert}
 	}