From 907d13606ca785b364d28e464e7a0a3f8123e034 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Sun, 5 Jul 2015 03:44:44 +0300 Subject: [PATCH] Fixed error details not being properly saved in fault property of customCommand tasks. --- lib/tasks.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks.coffee b/lib/tasks.coffee index 8860c4f..5dca46d 100644 --- a/lib/tasks.coffee +++ b/lib/tasks.coffee @@ -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]