From 6c7f89fcc4470b896c5c50bf7ee1bf1325809a4e Mon Sep 17 00:00:00 2001 From: Basile Henry Date: Thu, 22 Jul 2021 12:38:39 +0100 Subject: [PATCH] Handle new hydra login API issue --- src/hydra/reqwest_client.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hydra/reqwest_client.rs b/src/hydra/reqwest_client.rs index 2307aa2..e62bf8a 100644 --- a/src/hydra/reqwest_client.rs +++ b/src/hydra/reqwest_client.rs @@ -151,6 +151,10 @@ impl HydraClient for Client { Ok(r) => { if r.status().is_success() { Ok(()) + } else if r.status() == 500 { + // New hydra gives a 302 redirect to a page that ends up with a 500 + // Ideally we would not follow the redirect + Ok(()) // ignore redirect error } else { Err(ClientError::Error(format!("{}", r.status()))) }