Unverified Commit 5354c16d authored by alexpott's avatar alexpott

Issue #3188957 by anmolgoyal74, abarrio, xjm: Use...

Issue #3188957 by anmolgoyal74, abarrio, xjm: Use RequestException::hasResponse() in DrupalTestBrowser
parent 5cac1604
......@@ -140,12 +140,10 @@ protected function doRequest($request) {
// to re-throw the exception whenever the response is NULL, and
// ConnectException always has a NULL response.
catch (RequestException $e) {
$response = $e->getResponse();
// @todo RequestException has a hasResponse() method which we could use
// here instead. https://www.drupal.org/project/drupal/issues/3188957
if (NULL === $response) {
if (!$e->hasResponse()) {
throw $e;
$response = $e->getResponse();
return $this->createResponse($response);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment