From 0a8fe9c7a97da40526f05fa7059d20cb9db9bd03 Mon Sep 17 00:00:00 2001 From: Tom Stovall Date: Thu, 24 Oct 2024 10:29:37 -0700 Subject: [PATCH 1/2] Adding debug logging for when workflows fail --- src/Collections/Workflows.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Collections/Workflows.php b/src/Collections/Workflows.php index 99abf1aaa..09cd47295 100644 --- a/src/Collections/Workflows.php +++ b/src/Collections/Workflows.php @@ -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__ . "-"); From a5a9930576b7a21b2b821a0f8001c10d0790ba6b Mon Sep 17 00:00:00 2001 From: Tom Stovall Date: Thu, 24 Oct 2024 10:31:35 -0700 Subject: [PATCH 2/2] Adding request params --- src/Collections/Workflows.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Collections/Workflows.php b/src/Collections/Workflows.php index 09cd47295..f0ce1e3c3 100644 --- a/src/Collections/Workflows.php +++ b/src/Collections/Workflows.php @@ -106,6 +106,7 @@ 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("request params {debug}", ['debug' => print_r(params, true)]); $this->logger->debug("results {debug}", ['debug' => print_r($results, true)]); $this->logger->debug("********************************************************************************"); throw new TerminusException(