diff --git a/lib/index.js b/lib/index.js index 69c8dee..870f8c1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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 );