cleanup error messages

This commit is contained in:
Joel Wetzell
2025-12-20 07:50:22 -06:00
parent d32d23041b
commit fb9c0bc657
5 changed files with 13 additions and 13 deletions

View File

@@ -208,7 +208,7 @@ func init() {
pan, ok := params["pan"]
if !ok {
return nil, fmt.Errorf("freed.create requires an pan parameter")
return nil, fmt.Errorf("freed.create requires a pan parameter")
}
panString, ok := pan.(string)
@@ -222,7 +222,7 @@ func init() {
tilt, ok := params["tilt"]
if !ok {
return nil, fmt.Errorf("freed.create requires an tilt parameter")
return nil, fmt.Errorf("freed.create requires a tilt parameter")
}
tiltString, ok := tilt.(string)
@@ -236,7 +236,7 @@ func init() {
roll, ok := params["roll"]
if !ok {
return nil, fmt.Errorf("freed.create requires an roll parameter")
return nil, fmt.Errorf("freed.create requires a roll parameter")
}
rollString, ok := roll.(string)
@@ -308,7 +308,7 @@ func init() {
zoom, ok := params["zoom"]
if !ok {
return nil, fmt.Errorf("freed.create requires an zoom parameter")
return nil, fmt.Errorf("freed.create requires a zoom parameter")
}
zoomString, ok := zoom.(string)
@@ -322,7 +322,7 @@ func init() {
focus, ok := params["focus"]
if !ok {
return nil, fmt.Errorf("freed.create requires an focus parameter")
return nil, fmt.Errorf("freed.create requires a focus parameter")
}
focusString, ok := focus.(string)

View File

@@ -50,7 +50,7 @@ func init() {
method, ok := params["method"]
if !ok {
return nil, fmt.Errorf("http.request.create requires an method parameter")
return nil, fmt.Errorf("http.request.create requires a method parameter")
}
methodString, ok := method.(string)
@@ -62,7 +62,7 @@ func init() {
url, ok := params["url"]
if !ok {
return nil, fmt.Errorf("http.request.create requires an url parameter")
return nil, fmt.Errorf("http.request.create requires a url parameter")
}
urlString, ok := url.(string)

View File

@@ -48,7 +48,7 @@ func init() {
path, ok := params["path"]
if !ok {
return nil, fmt.Errorf("http.request.filter requires an path parameter")
return nil, fmt.Errorf("http.request.filter requires a path parameter")
}
pathString, ok := path.(string)

View File

@@ -74,7 +74,7 @@ func init() {
topic, ok := params["topic"]
if !ok {
return nil, fmt.Errorf("mqtt.message.create requires an topic parameter")
return nil, fmt.Errorf("mqtt.message.create requires a topic parameter")
}
topicString, ok := topic.(string)
@@ -86,7 +86,7 @@ func init() {
qos, ok := params["qos"]
if !ok {
return nil, fmt.Errorf("mqtt.message.create requires an qos parameter")
return nil, fmt.Errorf("mqtt.message.create requires a qos parameter")
}
qosByte, ok := qos.(float64)
@@ -98,7 +98,7 @@ func init() {
retained, ok := params["retained"]
if !ok {
return nil, fmt.Errorf("mqtt.message.create requires an retained parameter")
return nil, fmt.Errorf("mqtt.message.create requires a retained parameter")
}
retainedBool, ok := retained.(bool)
@@ -111,7 +111,7 @@ func init() {
payload, ok := params["payload"]
if !ok {
return nil, fmt.Errorf("mqtt.message.create requires an payload parameter")
return nil, fmt.Errorf("mqtt.message.create requires a payload parameter")
}
if payloadBytes, ok := payload.([]byte); ok {

View File

@@ -40,7 +40,7 @@ func init() {
pattern, ok := params["pattern"]
if !ok {
return nil, fmt.Errorf("http.request.filter requires an pattern parameter")
return nil, fmt.Errorf("http.request.filter requires a pattern parameter")
}
patternString, ok := pattern.(string)