Enhanced HttpError to now include the original request URI if possible.
diff --git a/apiclient/http.py b/apiclient/http.py
index 094271f..2132390 100644
--- a/apiclient/http.py
+++ b/apiclient/http.py
@@ -16,6 +16,7 @@
import os
from model import JsonModel
+from errors import HttpError
class HttpRequest(object):
@@ -67,6 +68,9 @@
resp, content = http.request(self.uri, self.method,
body=self.body,
headers=self.headers)
+
+ if resp.status >= 300:
+ raise HttpError(resp, content, self.uri)
return self.postproc(resp, content)