mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tech(mailer): improves error when grafana cannot read open cert/key file
ref #6949
This commit is contained in:
@@ -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}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user