-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Document "CoapClient was reset" promise rejection #46
Comments
This can happen on any request/observation that has not completed yet when the user calls |
for reference, this error I captured:
To reproduce:
|
Another option would capture this rejected promise and use the error callback to signal an error |
The error pops up, because you call
|
I know, it was just an idea, either update the docs that reset is an async function that returns a promise OR don't change the docs but use the error callback to signal the error. |
I'm leaning towards emitting a general library error and swallow the rejections. This means the corresponding documentation will have to state that all pending promises will neither be resolved or rejected anymore. Do you think this is good from a user's point of view? Regarding your code snippet: |
I'm fine with swallowing the error and emitting an error - i think as long as the emitted error is understandable it should be fine and makes the implementation easier. Yes I catch ping call, there was a rejection when I rebooted the gateway. |
DTLS timeout? If so, that's a bug since |
"CoapClient was reset" should now be swallowed and transformed into an |
Released in v0.10.0 |
see #44 (comment)
The text was updated successfully, but these errors were encountered: