This repository was archived by the owner on Oct 9, 2023. It is now read-only.
Commit 50d97da
authored
Safer cluster channel initialisation & better handling of invalid token errors (#306)
## What is the goal of this PR?
When setting up a Check that the `_stub` attribute exists before we check if its value is `None`. We also update the way we handle expired tokens.
## What are the changes implemented in this PR?
* Do a `hasattr` check before `self._stub is None` check in `_ClusterClient._new_channel`
* Wrap errors where the server rejects authentication because the provided token is not (or no longer) valid.1 parent 0d70c40 commit 50d97da
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
0 commit comments