add support for handling errors from the api
Merge pull request #6 from Clever/handle_errors

add support for handling errors from the api