google-maps-services-js
google-maps-services-js copied to clipboard
serialization errors get discarded
I was trying to create directions request with waypoints and passed a bad waypoint object in (extra nesting object around that {lat:..., lng:..} in the array. Effectively waypoints: [ {{lat:.., lng}}, ...].
Which resulted in this error being given back:
/Users/ghutchins/gob/datasets-routing-playground-launch/node_modules/@googlemaps/google-maps-services-js/node_modules/axios/lib/adapters/http.js:144 var customErr = new Error(err.message); ^
Error
at dispatchHttpRequest (/Users/ghutchins/gob/datasets-routing-playground-launch/node_modules/@googlemaps/google-maps-services-js/node_modules/axios/lib/adapters/http.js:144:23)
at new Promise (
Not very useful.
Once I added a console.log(...) to the above line in http.js
I got a better error message:
gots TypeError
at latLngToString (/Users/ghutchins/gob/datasets-routing-playground-launch/node_modules/@googlemaps/google-maps-services-js/dist/serialize.js:37:15)
at Array.map (
Might be caused by https://github.com/googlemaps/google-maps-services-js/blob/ba74bac126ee1bd37bb4c5ce917347d31c3ecb42/src/adapter.ts#L65