title: ERR wrong number of arguments for 'hmset' command
body: <p>I have the following code:</p>
  
  <pre><code>setOnOrder = (map) -&gt;
    console.log map
    if _.isEmpty map
      Promise.resolve()
    else
      hmsetPr "onorder.tmp", map
  
  onOrder = (req, res, next) -&gt;
    console.log req.query
    if req.query.syncStart
      delPr "onorder.tmp"
        .then -&gt; sendOK(res)
        .catch next
    else if req.query.syncComplete
      renamePr("onorder.tmp", "onorder")
        .then -&gt; sendOK(res)
        .catch next
    else
      onOrderMap = _(req.body)
        .groupBy( (r) -&gt; r.sku )
        .mapValues( (v) -&gt; JSON.stringify(v) )
        .value()
      console.log "sync.onorder #{_.size(onOrderMap)} skus"
      setOnOrder onOrderMap
        .then -&gt; sendOK(res)
        .catch next
  </code></pre>
  
  <p>where <code>map</code> is like:</p>
  
  <pre><code>{ 'N52Z-LH1': '[{"doCref":"E3320","doAccount":"EVE001","sku":"N52Z-LH1","crDate":"20150703","crTime":"09:52:52","reqQty":150,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'N52Z-LH2': '[{"doCref":"E3320","doAccount":"EVE001","sku":"N52Z-LH2","crDate":"20150703","crTime":"09:52:52","reqQty":150,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'N52Z-LH3': '[{"doCref":"E3320","doAccount":"EVE001","sku":"N52Z-LH3","crDate":"20150703","crTime":"09:52:52","reqQty":150,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'N54Z-BL1': '[{"doCref":"E3320","doAccount":"EVE001","sku":"N54Z-BL1","crDate":"20150703","crTime":"09:52:52","reqQty":100,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA01-MGR1': '[{"doCref":"E3321","doAccount":"ARM001","sku":"SA01-MGR1","crDate":"20150703","crTime":"15:47:52","reqQty":160,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA01-MGR2': '[{"doCref":"E3321","doAccount":"ARM001","sku":"SA01-MGR2","crDate":"20150703","crTime":"15:47:52","reqQty":320,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA01-MGR3': '[{"doCref":"E3321","doAccount":"ARM001","sku":"SA01-MGR3","crDate":"20150703","crTime":"15:47:52","reqQty":320,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA01-MGR4': '[{"doCref":"E3321","doAccount":"ARM001","sku":"SA01-MGR4","crDate":"20150703","crTime":"15:47:52","reqQty":240,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA01-MGR5': '[{"doCref":"E3321","doAccount":"ARM001","sku":"SA01-MGR5","crDate":"20150703","crTime":"15:47:52","reqQty":80,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA01-MPL3': '[{"doCref":"E3321","doAccount":"ARM001","sku":"SA01-MPL3","crDate":"20150703","crTime":"15:47:53","reqQty":240,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA02-MNA1': '[{"doCref":"E3322","doAccount":"ARM001","sku":"SA02-MNA1","crDate":"20150703","crTime":"15:49:59","reqQty":200,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA02-MNA2': '[{"doCref":"E3322","doAccount":"ARM001","sku":"SA02-MNA2","crDate":"20150703","crTime":"15:49:59","reqQty":300,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA02-MNA3': '[{"doCref":"E3322","doAccount":"ARM001","sku":"SA02-MNA3","crDate":"20150703","crTime":"15:49:59","reqQty":200,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA40-MBL5': '[{"doCref":"E3323","doAccount":"ARM001","sku":"SA40-MBL5","crDate":"20150703","crTime":"15:51:46","reqQty":25,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]',
    'SA40-MNA5': '[{"doCref":"E3323","doAccount":"ARM001","sku":"SA40-MNA5","crDate":"20150703","crTime":"15:51:46","reqQty":25,"recQty":0,"reqDate":"20150703","recDate":"","cmpLtd":"F"}]' }
  </code></pre>
  
  <p>but everytime i try to set it in redis, I get the following traceback:</p>
  
  <pre><code>http://localhost:3000/sync/onorder Error: ERR wrong number of arguments for 'hmset' command
    at JavascriptReplyParser._parseResult (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/redis/lib/parsers/javascript.js:43:16)
    at JavascriptReplyParser.try_parsing (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/redis/lib/parsers/javascript.js:114:21)
    at JavascriptReplyParser.run (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/redis/lib/parsers/javascript.js:126:22)
    at JavascriptReplyParser.execute (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/redis/lib/parsers/javascript.js:107:10)
    at Socket.&lt;anonymous&gt; (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/redis/index.js:131:27)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:146:16)
    at Socket.Readable.push (_stream_readable.js:110:10)
    at TCP.onread (net.js:523:20)
  From previous event:
    at ret (&lt;anonymous&gt;:8:21)
    at setOnOrder (/home/khine/Sandboxes/node-blade-boiler-template/app/controllers/sync.coffee:277:5)
    at onOrder (/home/khine/Sandboxes/node-blade-boiler-template/app/controllers/sync.coffee:295:5)
    at Layer.handle [as handle_request] (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/layer.js:95:5)
    at /home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:277:22
    at Function.process_params (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:330:12)
    at next (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:271:10)
    at Function.handle (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:176:3)
    at router (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:312:13)
    at /home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:330:12)
    at next (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:271:10)
    at urlencodedParser (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/body-parser/lib/types/urlencoded.js:81:44)
    at Layer.handle [as handle_request] (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:312:13)
    at /home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:330:12)
    at next (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/express/lib/router/index.js:271:10)
    at /home/khine/Sandboxes/node-blade-boiler-template/node_modules/body-parser/lib/read.js:129:5
    at invokeCallback (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/body-parser/node_modules/raw-body/index.js:262:16)
    at done (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/body-parser/node_modules/raw-body/index.js:251:7)
    at Gunzip.onEnd (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/body-parser/node_modules/raw-body/index.js:308:7)
    at emitNone (events.js:72:20)
    at Gunzip.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:905:12)
    at doNTCallback2 (node.js:441:9)
    at process._tickDomainCallback (node.js:396:17)
  </code></pre>
  
  <p>any advise on how to resolve this issue?</p>