Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
myasul opened this issue Apr 25, 2023 · 1 comment
Open

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

myasul opened this issue Apr 25, 2023 · 1 comment

Comments

@myasul
Copy link

myasul commented Apr 25, 2023

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.

@rdgout
Copy link

rdgout commented Sep 26, 2023

We are also encountering this issue, it would be great if an error could be thrown when there are no permissions.
Our application just hangs when this happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants