Skip to content

Commit

Permalink
Merge pull request jrit#17 from Josiah/correct-http-error-status
Browse files Browse the repository at this point in the history
Return the correct status code on http error
  • Loading branch information
jrit committed Nov 3, 2015
2 parents 5f0ace4 + 410285d commit 8682781
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ util.getRemote = function( uri, callback, toDataUri )
}
else if( response.statusCode !== 200 )
{
return callback( new Error( uri + " returned http " + response.code ) );
return callback( new Error( uri + " returned http " + response.statusCode ) );
}

if( toDataUri )
Expand Down
2 changes: 1 addition & 1 deletion test/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ describe( "html", function()
},
function( err, result )
{
assert.equal( !!err, true );
assert.equal( err.message, "https://raw.githubusercontent.com/not-a-file.css returned http 400" );
done();
}
);
Expand Down

0 comments on commit 8682781

Please sign in to comment.