Add exception logging to BatchController import skip #76

Closed
opened 2026-06-23 13:32:27 +00:00 by jmiller · 1 comment
Owner

Summary

The BatchController at line 121 catches \RuntimeException during batch insert but silently increments $skipped++ without logging the exception. Users don't know why records failed.

Current Behavior

catch (\RuntimeException $e) {
    $skipped++;
}

Expected Behavior

catch (\RuntimeException $e) {
    $skipped++;
    Log::add('Batch insert failed for article ' . $articleId . ': ' . $e->getMessage(), Log::WARNING, 'mokoog');
}

Impact

  • Silent failures during batch generation — user sees "5 skipped" but doesn't know why
  • Makes debugging batch issues unnecessarily difficult
## Summary The `BatchController` at line 121 catches `\RuntimeException` during batch insert but silently increments `$skipped++` without logging the exception. Users don't know why records failed. ## Current Behavior ```php catch (\RuntimeException $e) { $skipped++; } ``` ## Expected Behavior ```php catch (\RuntimeException $e) { $skipped++; Log::add('Batch insert failed for article ' . $articleId . ': ' . $e->getMessage(), Log::WARNING, 'mokoog'); } ``` ## Impact - Silent failures during batch generation — user sees "5 skipped" but doesn't know why - Makes debugging batch issues unnecessarily difficult
jmiller added this to the Code Quality & Testing milestone 2026-06-23 13:32:27 +00:00
jmiller added the enhancement label 2026-06-23 13:32:27 +00:00
Author
Owner

Branch created: feature/76-add-exception-logging-to-batchcontroller

git fetch origin
git checkout feature/76-add-exception-logging-to-batchcontroller
Branch created: [`feature/76-add-exception-logging-to-batchcontroller`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteOpenGraph/src/branch/feature/76-add-exception-logging-to-batchcontroller) ```bash git fetch origin git checkout feature/76-add-exception-logging-to-batchcontroller ```
Sign in to join this conversation.
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteOpenGraph#76