Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/google-api-core/google/api_core/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import http.client
from typing import Optional, Dict
from typing import Union
import warnings

from google.rpc import error_details_pb2
Expand Down Expand Up @@ -121,7 +120,7 @@ class GoogleAPICallError(GoogleAPIError, metaclass=_GoogleAPICallErrorMeta):
(google.rpc.error_details.ErrorInfo).
"""

code: Union[int, None] = None
code: Optional[int] = None
"""Optional[int]: The HTTP status code associated with this error.
This may be ``None`` if the exception does not have a direct mapping
Expand All @@ -130,7 +129,7 @@ class GoogleAPICallError(GoogleAPIError, metaclass=_GoogleAPICallErrorMeta):
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
"""

grpc_status_code = None
grpc_status_code: Optional["grpc.StatusCode"] = None
"""Optional[grpc.StatusCode]: The gRPC status code associated with this
error.
Expand Down
Loading