GuilhermeC18/node-onvif

Wrong error format when password or username is wrong

oleaasbo opened this issue · 0 comments

When password or username is wrong i get this error:

Error: Failed to initialize the device: Error: [object Object]
    at services.device.getCapabilities (/home/ano/programmering/rtp test/node_modules/node-onvif/lib/modules/device.js:396:12)
    at promise.then.catch (/home/ano/programmering/rtp test/node_modules/node-onvif/lib/modules/service-device.js:120:4)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)

I would like to get more info then Error: [object Object].
The fix can be found here. Please tell me if this breaks something else! If it does not, then i think this should be fixed.