Skip to content

Commit 50206ef

Browse files
committed
Added error handling to response object in parseURL method
1 parent f06df6b commit 50206ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dist/rss-parser.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ Parser.parseURL = function(url, callback) {
123123
res.on('end', function() {
124124
return Parser.parseString(xml, callback);
125125
})
126+
res.on('error', function(){
127+
callback;
128+
})
126129
})
127130
req.on('error', callback);
128131
}

0 commit comments

Comments
 (0)