Skip to content

Commit

Permalink
add got library error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilziajka committed Aug 9, 2016
1 parent 078b365 commit 3d1eb19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ function fromUrl( url, options, cb ) {
options.typeOverride = response.headers['content-type'].split( /;/ )[0];
}
})
.on ( 'error', typeof options === 'function' ? options : cb )
.pipe( file );
} else {
_returnArgsError( arguments );
Expand Down

0 comments on commit 3d1eb19

Please sign in to comment.