When calling Cam.prototype.unsubscribe, a second unsubscribe is then soon triggered that passes no event data.
This second call originates from Cam.prototype._eventRequest and passes no callback method, so the
throw new Error('You should create pull-point subscription first!')
goes unhandled, as the call in eventRequest is not in a try/catch.
I am not sure why this second call to unsubscribe is triggered, as part of the unsubscribe flow, and have not been able to correctly handle the error that is thrown as result of it.
https://github.com/agsh/onvif/blob/768bc8b4220a31c1813c3e78355e45e8a6826605/lib/events.js
When calling Cam.prototype.unsubscribe, a second unsubscribe is then soon triggered that passes no event data. This second call originates from Cam.prototype._eventRequest and passes no callback method, so the throw new Error('You should create pull-point subscription first!') goes unhandled, as the call in eventRequest is not in a try/catch.
I am not sure why this second call to unsubscribe is triggered, as part of the unsubscribe flow, and have not been able to correctly handle the error that is thrown as result of it.