googlemaps
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -406,2 +406,8 @@ var qs = require('querystring'), | ||
return function(err, jsonString) { | ||
if (err){ | ||
callback(err); | ||
return; | ||
} | ||
try { | ||
@@ -529,3 +535,5 @@ callback(err, JSON.parse(jsonString)); | ||
} | ||
return callback(new Error("Response status code: " + res.statusCode), data); | ||
error = new Error(data); | ||
error.code = res.statusCode; | ||
return callback(error, data); | ||
}); | ||
@@ -532,0 +540,0 @@ } |
{ | ||
"name": "googlemaps", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"main": "./lib/googlemaps", | ||
@@ -5,0 +5,0 @@ "description": "A simple way to query the Google Maps API from Node.js", |
@@ -0,1 +1,3 @@ | ||
[![Build Status](https://travis-ci.org/moshen/node-googlemaps.svg)](https://travis-ci.org/moshen/node-googlemaps.svg) | ||
# Google Maps API for Node.js | ||
@@ -2,0 +4,0 @@ A simple way to query the Google Maps API from Node.js |
22326
469
123