Commit c5bbdea
authored
Handle failed token test without leaking token (#1138)
If the line `token_info = token_response[token]` fails with a `KeyError`
(due to an error response from lichess), the user's token will be
printed in the error message. Use `token_response.get()` to prevent
this.
Also, use `.get()` on the resulting `token_info` to print a more useful
error message.1 parent ef2f735 commit c5bbdea
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
0 commit comments