Skip to content

Commit

Permalink
Merge pull request #93 from kazet15/got-error-handling
Browse files Browse the repository at this point in the history
add got library error handling
  • Loading branch information
dbashford authored Nov 1, 2016
2 parents c0e66e7 + 3d1eb19 commit ac6ab9a
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 ac6ab9a

Please sign in to comment.