1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-08-13 20:04:49 +02:00

Chore: Standardize error message casing

This commit is contained in:
Ralph Slooten
2025-03-29 16:32:42 +13:00
parent 6c0ef5ba33
commit 20b2eb22d4
3 changed files with 6 additions and 6 deletions

View File

@@ -130,27 +130,27 @@ func saveMessages() error {
res, err := http.Get(base + "api/v1/message/" + m.ID + "/raw")
if err != nil {
logger.Log().Errorf("Error fetching message %s: %s", m.ID, err.Error())
logger.Log().Errorf("error fetching message %s: %s", m.ID, err.Error())
continue
}
b, err = io.ReadAll(res.Body)
if err != nil {
logger.Log().Errorf("Error fetching message %s: %s", m.ID, err.Error())
logger.Log().Errorf("error fetching message %s: %s", m.ID, err.Error())
continue
}
} else {
var err error
b, err = storage.GetMessageRaw(m.ID)
if err != nil {
logger.Log().Errorf("Error fetching message %s: %s", m.ID, err.Error())
logger.Log().Errorf("error fetching message %s: %s", m.ID, err.Error())
continue
}
}
if err := os.WriteFile(out, b, 0644); /* #nosec */ err != nil {
logger.Log().Errorf("Error writing message %s: %s", m.ID, err.Error())
logger.Log().Errorf("error writing message %s: %s", m.ID, err.Error())
continue
}

View File

@@ -32,7 +32,7 @@ func createForwardingSMTPClient(config config.SMTPForwardConfigStruct, addr stri
conn, err := tls.Dial("tcp", addr, tlsConf)
if err != nil {
return nil, fmt.Errorf("TLS Dial error: %v", err)
return nil, fmt.Errorf("TLS dial error: %v", err)
}
client, err := smtp.NewClient(conn, tlsConf.ServerName)

View File

@@ -66,7 +66,7 @@ func createRelaySMTPClient(config config.SMTPRelayConfigStruct, addr string) (*s
conn, err := tls.Dial("tcp", addr, tlsConf)
if err != nil {
return nil, fmt.Errorf("TLS Dial error: %v", err)
return nil, fmt.Errorf("TLS dial error: %v", err)
}
client, err := smtp.NewClient(conn, tlsConf.ServerName)