moshen / node-googlemaps

A simple way to query the Google Maps API from Node.js
MIT License
559 stars 148 forks source link

Pass X-StaticMap-API-Warning header errors in staticMap callback #153

Open Kaschman opened 5 years ago

Kaschman commented 5 years ago

As stipulated in Google's documentation, Static Map errors are returned in the X-StaticMap-API-Warning header: https://developers.google.com/maps/documentation/maps-static/error-messages

I expected any errors in the header to be included in the callback function below but they are not. gmAPI.staticMap(params, function(err, binaryImage) { // fetch asynchronously the binary image });