From 60938c245ad71b0d2977562b9abe9075cdfa2580 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Fri, 30 Jan 2015 11:34:46 -0800 Subject: [PATCH] Fix deprecation --- lib/storage-handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/storage-handler.js b/lib/storage-handler.js index 65dd441..af964b7 100644 --- a/lib/storage-handler.js +++ b/lib/storage-handler.js @@ -134,12 +134,12 @@ exports.download = function (provider, req, res, container, file, cb) { reader.on('error', function (err) { if (err.code === 'ENOENT') { res.type('application/json'); - res.send(404, { error: err }); + res.status(404).send({ error: err }); return; } res.type('application/json'); - res.send(500, { error: err }); + res.status(500).send({ error: err }); }); }