From 228cbd1a55b51db9accab17cf84ba20c05d16b42 Mon Sep 17 00:00:00 2001 From: Brian Weaver Date: Wed, 20 Sep 2023 15:46:53 -0400 Subject: [PATCH] Adjust handling of TerminusCollection items lacking useful data --- src/Collections/TerminusCollection.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Collections/TerminusCollection.php b/src/Collections/TerminusCollection.php index a034b7af6..c2c427d0a 100644 --- a/src/Collections/TerminusCollection.php +++ b/src/Collections/TerminusCollection.php @@ -109,8 +109,16 @@ public function fetch() 'type' => gettype($model_data), 'bad_data' => $bad_data ]; - $this->logger->error($error_message, $context); - break; + + // verbose logging for debugging + $this->logger->debug($error_message, $context); + + // less information for more user-facing messages, but a problem has occurred and we're skipping this + // item so we should still surface a user-facing message + $this->logger->warn("Model data missing for {id}", ['id' => $id,]); + + // skip this item since it lacks useful data + continue; } if (!isset($model_data->id)) { $model_data->id = $id;