diff --git a/googleapiclient/errors.py b/googleapiclient/errors.py index 7163645ef70..49105675f0b 100644 --- a/googleapiclient/errors.py +++ b/googleapiclient/errors.py @@ -44,6 +44,10 @@ def __init__(self, resp, content, uri=None): self.uri = uri self.error_details = "" + @property + def status_code(self): + return self.resp.status + def _get_reason(self): """Calculate the reason for the error from the response content.""" reason = self.resp.reason