+import json
+from apiclient import errors as apiclient_errors
+
+class ApiError(apiclient_errors.HttpError):
+ def _get_reason(self):
+ try:
+ return '; '.join(json.loads(self.content)['errors'])
+ except (KeyError, TypeError, ValueError):
+ return super(ApiError, self)._get_reason()
+
+