Open z3ntu opened 6 years ago
Hi,
the handler for errors caused by the socket connection is set here: https://github.com/pipobscure/NodeJS-AsteriskManager/blob/master/lib/ami.js#L82 The errors themselves are emitted here: https://github.com/pipobscure/NodeJS-AsteriskManager/blob/master/lib/ami.js#L87
To receive them, you must of course set an error
listener in your code.
The code section you mentioned (https://github.com/pipobscure/NodeJS-AsteriskManager/blob/master/lib/ami.js#L49-L51) contains only listeners internally used by the manager instance for further processing of events. An error handler is obviously not needed (yet) at this point.
When this is run and something (e.g. the password) is wrong, then the error is silently ignored (see https://github.com/pipobscure/NodeJS-AsteriskManager/blob/master/lib/ami.js#L50). Only after the object creation I can do
to see the error. Is there another way I am not seeing?