flickr / flickr-sdk

Almost certainly the best Flickr API client in the world for node and the browser
https://www.flickr.com/services/api
MIT License
131 stars 29 forks source link

Use .ok() callback instead of custom JSON parsers #118

Closed jeremyruppel closed 6 years ago

jeremyruppel commented 6 years ago

Since visionmedia/superagent#1291, we can now throw a custom error in Request#ok and it will catch and yield that error instead of a generic HTTP response error. This means we can get rid of the custom JSON parsing routines we've been using and simply use this callback to detect REST API stat=fail responses.