moshen / node-googlemaps

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

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

Open Kaschman opened 6 years ago

Kaschman commented 6 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 });