Explorar el Código

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

ref #6949
bergquist hace 9 años
padre
commit
f907330c9e
Se han modificado 1 ficheros con 1 adiciones y 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}
 	}