Should streams.getMessage return null instead of throwing when no message is found? #628
Unanswered
StrangeBytesDev
asked this question in
Ideas
Replies: 2 comments
-
I am going to investigate the ramifications. For KV I do exactly that, so it seems reasonable to adopt this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
https://github.com/nats-io/nats.deno/issues/629 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
streams.getMessage seems particularly useful to me to check if a queued task is still in the queue. Something like:
Currently, this is relatively easy to do by just using a try catch around getMessage, but it seems to me like returning null would be a little easier to work with, and makes more intuitive sense as a response.
Beta Was this translation helpful? Give feedback.
All reactions