Fixed error details not being properly saved in fault property of customCommand tasks.

This commit is contained in:
Zaid Abdulla committed 2015-07-05 03:44:59 +03:00
1 parent 1c5b100561
commit 907d13606c
1 file changed
+2 -2
+2 -2
View File
@@ -354,8 +354,8 @@ this.download = (task, methodResponse, callback) ->
this.customCommand = (task, methodResponse, callback) ->
# TODO implement timeout
customCommands.execute(task.device, task.command, (err, value) ->
if err?
task.fault = err
if err
task.fault = {name : err.name, message : err.message}
callback(null, STATUS_FAULT)
else
commandName = task.command.split(' ', 2)[0]