NYCPlanning / deprecated-labs-zap-api

Deprecated version of the ZAP API, see https://github.com/NYCPlanning/labs-zap-api
Other
5 stars 3 forks source link

Refactor Carto utility to not return undefined #80

Open hannahkates opened 5 years ago

hannahkates commented 5 years ago

While working on the upsert-geoms utility we noticed that the carto utility will return [undefined] objects if the query produces no results. This is problematic for error handling. We set up a workaround that created nulls in the format we were expecting instead (link below), but it would be great to refactor the carto utility to avoid this problem.

https://github.com/NYCPlanning/labs-zap-api/blob/develop/utils/upsert-geoms.js#L64