Skip to content

MqttJS-Unity error handling #1

@jimkberry

Description

@jimkberry

The current build of Mqtt.JS is pretty sketchy with regard to error reporting for "expected" errors, things like: authorization failures or bad connection URLs. The is an onError hook, but for whatever reason it doesn't seem to fire for many of these situations, and for others it fires but returns nonsense error messages. (Tak a look at the Mqtt.JS repo issues for more details)

Anyway - I don't think it's worth holding up the rest of this project in order to try to find fixes/workarounds, but there at least should be an issue that tracks the status of these errors.

Connection errors:

  • Bad protocol (really just "not ws or wss")
    exception fires inside mqtt.connect() but error object is "{ }"
  • Bad host name
    mqtt.connect() succeeds and an exception fires afterward. Error object is {"isTrusted":true}
  • Bad host address
  • Bad port
  • Bad user
  • Bad pwd
  • Bad path

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions