allow user to catch error from api, resolves #6