Skip to content

Commit

Permalink
Fix: Properly re-raise non-grpc exceptions during refreshing of proxy…
Browse files Browse the repository at this point in the history
…-auth credentials in auth interceptor

Signed-off-by: Fabio Grätz <[email protected]>
  • Loading branch information
Fabio Grätz committed Jul 19, 2024
1 parent a6a8651 commit 7370f6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flytekit/clients/grpc_utils/auth_interceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7370f6c

Please sign in to comment.