Improved error handling and passing of error messages/codes back to caller.
Merge pull request #3 from mapbox/pass-errors

Improved error handling and passing of error messages