Skip to content

Commit 195c609

Browse files
authored
Merge pull request #3 from leoherzog/patch-1
Add Support for Throwing Errors
2 parents 6fc8208 + b41e0a7 commit 195c609

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ipapi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var _request = function(path, callback, isJson){
3737
});
3838

3939
req.on('error', function(e) {
40-
console.log('Request Error ! ' + e.message);
40+
callback(new Error(e));
4141
});
4242
};
4343

0 commit comments

Comments
 (0)