Skip to content

Commit

Permalink
add error log when something goes wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydp17 committed Mar 29, 2018
1 parent ecf6819 commit 617dc5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/storage-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ exports.upload = function(provider, req, res, options, cb) {
};

function handleError(res, err) {
console.error('loopback-component-storage error:', err);
if (err.code === 'ENOENT') {
res.type('application/json');
res.status(404).send({error: err});
Expand Down

0 comments on commit 617dc5b

Please sign in to comment.