Promises are now properly chained; errors are in JSON

This affects methods that perform more than 1 request before returning.
If an error occurs it is resolved as a JSON object so an appropriate
error message can be generated