Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Fixed uncaught error when parsing certain URLs #33

wants to merge 1 commit into from

2 participants


Found an issue when parsing certain URLs.

The problem first presented itself when parsing It would fail with an uncaught error in main.js around line 1143 trying to get a status code for the returned response.

Now it checks that the STATUS_CODES object exists before trying to use it.


I don't know what API changed, but a better solution was to just use the core HTTP module directly to look up the status code. Thanks for raising the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 27, 2012
  1. @patrickod
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +5 −1 main.js
6 main.js
@@ -1140,7 +1140,11 @@ FeedParser.parseUrl = function (url, options, callback) {
var handleResponse = function (response) {
fp.emit('response', response);
var code = response.statusCode;
- var codeReason = response.request.httpModule.STATUS_CODES[code] || 'Unknown Failure';
+ if (response.request.httpModule.STATUS_CODES != undefined) {
+ var codeReason = response.request.httpModule.STATUS_CODES[code] || 'Unknown Failure';
+ } else {
+ var codeReason = "Unknown Failure"
+ }
var contentType = response.headers && response.headers['content-type'];
var e = new Error();
if (code !== 200) {
Something went wrong with that request. Please try again.