Decouple client code from resin.errors

This commit is contained in:
Juan Cruz Viotti 2014-12-22 15:29:15 -04:00
parent da099e876d
commit 0746723abd

View File

@ -53,6 +53,6 @@ exports.add = permissions.user (params) ->
error.message = "File is a directory: #{params.path}"
if error.code is 'ENOENT'
error = new resin.errors.FileNotFound(params.path)
error = new Error("File not found: #{params.path}")
errors.handle(error)