Skip to content

Commit

Permalink
[FIXED] Fix unsupported MQTT topic characters error message (#4903)
Browse files Browse the repository at this point in the history
Previously ' ' and '.' were not supported for MQTT topics until
[#4243](#4243) brought in
support for '.'. However the error message for unsupported characters
appears to not have been updated. This simply updates the error message.

Had an example of a MQTT client trying to connect to `spBv1.0/Field
Devices` and the error message indicated that both '.' and ' ' were
unsupported which was misleading as only ' ' is unsupported.

Signed-off-by: Tom Hollingworth <tom.hollingworth@spruiktec.com>
  • Loading branch information
derekcollison committed Dec 19, 2023
2 parents 154c728 + 0ca2e47 commit 3d8a017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/mqtt.go
Expand Up @@ -217,7 +217,7 @@ var (
errMQTTEmptyUsername = errors.New("empty user name not allowed")
errMQTTTopicIsEmpty = errors.New("topic cannot be empty")
errMQTTPacketIdentifierIsZero = errors.New("packet identifier cannot be 0")
errMQTTUnsupportedCharacters = errors.New("characters ' ' and '.' not supported for MQTT topics")
errMQTTUnsupportedCharacters = errors.New("character ' ' not supported for MQTT topics")
errMQTTInvalidSession = errors.New("invalid MQTT session")
)

Expand Down

0 comments on commit 3d8a017

Please sign in to comment.