cleanup error messages

This commit is contained in:
Joel Wetzell
2026-02-09 19:15:34 -06:00
parent 988437fccf
commit 6b178d1ae4
6 changed files with 9 additions and 9 deletions

View File

@@ -36,7 +36,7 @@ func init() {
brokerString, ok := broker.(string)
if !ok {
return nil, errors.New("mqtt.client broker must be string")
return nil, errors.New("mqtt.client broker must be a string")
}
topic, ok := params["topic"]
@@ -48,7 +48,7 @@ func init() {
topicString, ok := topic.(string)
if !ok {
return nil, errors.New("mqtt.client topic must be string")
return nil, errors.New("mqtt.client topic must be a string")
}
clientId, ok := params["clientId"]
@@ -60,7 +60,7 @@ func init() {
clientIdString, ok := clientId.(string)
if !ok {
return nil, errors.New("mqtt.client clientId must be string")
return nil, errors.New("mqtt.client clientId must be a string")
}
return &MQTTClient{config: config, Broker: brokerString, Topic: topicString, ClientID: clientIdString, logger: CreateLogger(config)}, nil