Should publishing and subscribing to an unpermissioned subject cause exceptions? #744
-
Hi, my question is as per the title really. For example : If I only have publish and subscribe permissions to the subject "user.alice.debug" and then try and publish to "user.bob.debug" , should this not cause an exception? using core NATS only, something like ;
The server logs the following error...
But the client is silent. Likewise, I would have thought that trying to listen in on user.bob.debug whilst only permissioned for user.alice.debug would also cause an exception. What's the expected behaviour for the clients in this manner? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
-ERR messages comes async so we cant detect at core NATS level. We are logging but not raising an event. looking into that right now... Edit #745 |
Beta Was this translation helpful? Give feedback.
just created PR #745
We can't throw exception since error would be sent asynchronously (core publish is fire-forget) but you can with this PR observe the error in an event.