Skip to content

Commit

Permalink
Adding debug logging for when workflows fail
Browse files Browse the repository at this point in the history
  • Loading branch information
stovak committed Oct 24, 2024
1 parent 581296d commit 0a8fe9c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Collections/Workflows.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,14 @@ public function create($type, array $options = []): Workflow
]
);
if ($results->isError()) {
$this->logger->debug("Workflow Creation Failed: {error}", ['error' => $results->getStatusCodeReason()]);
$this->logger->debug("********************************************************************************");
$this->logger->debug("results {debug}", ['debug' => print_r($results, true)]);
$this->logger->debug("********************************************************************************");
throw new TerminusException(
"Workflow Creation Failed: {error}",
['error' => $results->getStatusCodeReason()]
['error' => $results->getStatusCodeReason()],
$results->getStatusCode()
);
}
$nickname = \uniqid(__CLASS__ . "-");
Expand Down

0 comments on commit 0a8fe9c

Please sign in to comment.