throw an exception if the http request fails
Merge branch 'exceptions'