Skip to content

Commit

Permalink
[FIXED] Fix unsupported MQTT characters error message
Browse files Browse the repository at this point in the history
Previously ' ' and '.' were not supported for MQTT topics until #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 publish to `spBv1.0/Field Devices/Some Device/Some Topic` and the error message indicated that both '.' and ' ' were unsupported which was misleading as only ' ' is unsupported.
  • Loading branch information
Tom Hollingworth authored and wallyqs committed Dec 26, 2023
1 parent 36dbf3e commit 1cdcafa
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 1cdcafa

Please sign in to comment.