Skip to content

Commit

Permalink
Adjust handling of TerminusCollection items lacking useful data
Browse files Browse the repository at this point in the history
  • Loading branch information
namespacebrian committed Sep 20, 2023
1 parent 74852be commit 228cbd1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Collections/TerminusCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 228cbd1

Please sign in to comment.