Fixed error details not being properly saved in fault property of customCommand tasks.
This commit is contained in:
1 parent
1c5b100561
commit
907d13606c
1 file changed
+2
-2
+2
-2
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user