If I have a async function with a callback inside like this:
fs.readFile(req.files.file.path, function (err, data) {
return callback(err, data);
});
And I'd like to append or add a simple message to the existing error object (err
) (hopefully it's an object, may be string). Whats the best way to do so? I can wrap this error inside another?