diff --git a/build/integration/features/auth.feature b/build/integration/features/auth.feature index f9c8b7d0e46..4601221c808 100644 --- a/build/integration/features/auth.feature +++ b/build/integration/features/auth.feature @@ -104,7 +104,7 @@ Feature: auth Then the HTTP status code should be "200" When the CSRF token is extracted from the previous response When a new unrestricted client token is added using restricted basic token auth - Then the HTTP status code should be "503" + Then the HTTP status code should be "403" Scenario: Creating a restricted auth token with regular login should work When a new restricted client token is added @@ -113,4 +113,3 @@ Feature: auth Scenario: Creating an unrestricted auth token with regular login should work When a new unrestricted client token is added Then the HTTP status code should be "200" - diff --git a/build/integration/features/bootstrap/Auth.php b/build/integration/features/bootstrap/Auth.php index d95aca8ea35..3ba596f8f24 100644 --- a/build/integration/features/bootstrap/Auth.php +++ b/build/integration/features/bootstrap/Auth.php @@ -93,7 +93,9 @@ trait Auth { try { $this->response = $client->request('POST', $fullUrl, $options); - } catch (\GuzzleHttp\Exception\ServerException $e) { + } catch (ClientException $ex) { + $this->response = $ex->getResponse(); + } catch (ServerException $e) { $this->response = $e->getResponse(); } return json_decode($this->response->getBody()->getContents());