Skip to content

Commit

Permalink
[BUGS-3638] Handle error processing workflow in connection:set comman…
Browse files Browse the repository at this point in the history
…d. (#2563)

* Handle 400 error in connection:set command.

* Fix linter.

* Fix linter.

* We should check now on workflow processing.

* Coding standards.

* Update src/Commands/Connection/SetCommand.php

Co-authored-by: Brian Weaver <87093053+namespacebrian@users.noreply.github.com>

---------

Co-authored-by: Brian Weaver <87093053+namespacebrian@users.noreply.github.com>
  • Loading branch information
kporras07 and namespacebrian committed Apr 22, 2024
1 parent bfc68b2 commit 6256b90
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Commands/Connection/SetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,18 @@ public function connectionSet($site_env, $mode)
throw $e;
}

$this->processWorkflow($workflow);
try {
$this->processWorkflow($workflow);
} catch (TerminusException $e) {
if (strpos($e->getMessage(), 'build_status is building') !== false) {
throw new TerminusException(
'Cannot switch to SFTP mode because the most recent Integrated Composer build ' .
'is either still running or encountered errrors.' .
'Please check your latest commit in the dashboard.'
);
}
throw $e;
}
$this->log()->notice($workflow->getMessage());
}
}

0 comments on commit 6256b90

Please sign in to comment.