Errors are undetectable
toolness opened this issue · 7 comments
toolness commented
Hey, I noticed in the code that errors appear to be logged but then nothing is done about them:
client.putBuffer(file.contents, uploadPath, headers, function(err, res) {
if (err || res.statusCode !== 200) {
gutil.log(gutil.colors.red('[FAILED]', file.path + " -> " + uploadPath));
} else {
gutil.log(gutil.colors.green('[SUCCESS]', file.path + " -> " + uploadPath));
res.resume();
}
});
It would be nice if an error event or something was emitted, so that gulp tasks could raise errors instead of having the process exit with status code 0 even though things went amiss.
tomdidom commented
+1
mpelzsherman commented
+1
christianhaller commented
+1
nicholascloud commented
+1
mfonda commented
+1
christianhaller commented
Thank you @nitaigao :)