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

435: Add a retry to the api call in new-filed update script #95

Closed ghost closed 5 years ago

ghost commented 5 years ago

As is maybe clear from this code, I'm a bit unsure about how to deal with promises. like, generally.

I'd imagine there's gotta be a cleaner, better looking way to do this, but this is what I could come up with. The problem is complicated by the requirement that I want to use the JSON parsing as part of the check when deciding to retry.

Feedback greatly greatly appreciated.