diff --git a/flytekit/clients/grpc_utils/auth_interceptor.py b/flytekit/clients/grpc_utils/auth_interceptor.py index e467801a77..6a73e0764e 100644 --- a/flytekit/clients/grpc_utils/auth_interceptor.py +++ b/flytekit/clients/grpc_utils/auth_interceptor.py @@ -61,6 +61,8 @@ def intercept_unary_unary( fut: grpc.Future = continuation(updated_call_details, request) e = fut.exception() if e: + if not hasattr(e, "code"): + raise e if e.code() == grpc.StatusCode.UNAUTHENTICATED or e.code() == grpc.StatusCode.UNKNOWN: self._authenticator.refresh_credentials() updated_call_details = self._call_details_with_auth_metadata(client_call_details)