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.
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 APIstat=fail
responses.