Skip to content

How to catch errors like access_refused when using client.publish #56

@myasul

Description

@myasul

We are setting up permissions for all of our MQTT users and want to test out if the user can't really access certain queues without the correct permission. But when I used client.publish(topic, payload, {qos: 1}) it just tries to keep sending it.

When I changed it to {qos: 0}, it fired and forgot. I also tried wrapping it in a try-catch statement, but I'm not catching anything.

Please advise.

Metadata

Metadata

Assignees

No one assigned

    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