Commit d6015ee
committed
bugfix: run: Respect the server's choice of URL when fetching api key.
In the case where we connect to the server to fetch the api_key, but don't use
the preferred realm_url (with protocol), the server gives a 405 error. This is
interpreted by the current logic as that the email or password is incorrect,
which is confusing to a user.
Instead, use the server data that we already have available to adjust the
entered value to that preferred by the server.
The preferred URL is then passed back to be written in any created zuliprc.
Test updated.
This code could benefit from additional error handling, but this fixes #1318.1 parent f20d94e commit d6015ee
2 files changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
233 | | - | |
| 237 | + | |
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
240 | | - | |
| 244 | + | |
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| |||
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
270 | | - | |
| 274 | + | |
271 | 275 | | |
272 | 276 | | |
273 | 277 | | |
274 | 278 | | |
275 | | - | |
| 279 | + | |
276 | 280 | | |
277 | 281 | | |
278 | 282 | | |
| |||
0 commit comments