Skip to content

Commit ff69ba4

Browse files
committed
Merge pull request #9 from marcusds/master
Better error reporting on upload fail.
2 parents a6c335b + cbc83e8 commit ff69ba4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tasks/http_upload.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ module.exports = function(grunt) {
5959
headers: options.headers,
6060
multipart: true,
6161
data: reqData
62+
}).on('error',function(e){
63+
grunt.fail.warn('Failed uploading (error code: ' + e.message + ')');
6264
}).on('complete', function(data, response) {
6365
if (response !== null && response.statusCode >= 200 && response.statusCode < 300) {
6466
grunt.log.ok('Upload successful of "' + filepath + '" as "' + field + '" - ' + options.method + ' @ ' + options.url);

0 commit comments

Comments
 (0)