Skip to content

Handled throwables during feed initialization - #1291

Open
girishpanchal30 wants to merge 3 commits into
developmentfrom
bugfix/1195
Open

Handled throwables during feed initialization#1291
girishpanchal30 wants to merge 3 commits into
developmentfrom
bugfix/1195

Conversation

@girishpanchal30

Copy link
Copy Markdown
Contributor

Summary

Improved error handling and logging throughout the feed initialization and cron job processes

Check before Pull Request is ready:

Closes #1195

@girishpanchal30
girishpanchal30 requested a review from Copilot July 23, 2026 16:28
@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label Jul 23, 2026
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Jul 23, 2026
@pirate-bot

pirate-bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Plugin build for d88248d is ready 🛎️!

Note

You can preview the changes in the Playground

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents SimplePie TypeError failures from terminating feed initialization or cron cycles.

Changes:

  • Catches Throwable during primary and fallback feed initialization.
  • Continues processing cron jobs after throwable failures.
  • Adds structured error logging for initialization failures.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
includes/admin/feedzy-rss-feeds-import.php Broadens cron error handling to all throwables.
includes/abstract/feedzy-rss-feeds-admin-abstract.php Handles and logs SimplePie initialization failures.
Comments suppressed due to low confidence (2)

includes/abstract/feedzy-rss-feeds-admin-abstract.php:977

  • The multi-feed throwable log also omits $e->getTraceAsString(), so a failed SimplePie initialization does not meet issue #1195’s stack-trace logging acceptance criterion.
						'error'    => $e->getMessage(),

includes/abstract/feedzy-rss-feeds-admin-abstract.php:1248

  • The cloned-feed failure log records only the exception message. Add the throwable trace so fallback initialization failures retain the diagnostic detail required by issue #1195.
					'error'    => $e->getMessage(),

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread includes/abstract/feedzy-rss-feeds-admin-abstract.php Outdated
Comment thread includes/abstract/feedzy-rss-feeds-admin-abstract.php Outdated
Comment on lines +898 to +900
try {
$feed->init();
} catch ( \Throwable $e ) {
}
do_action( 'feedzy_run_cron_extra', $job );
} catch ( Exception $e ) {
} catch ( \Throwable $e ) {
@selul

selul commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@girishpanchal30 make sure the checks are passing and no strings are added for this change.

@girishpanchal30

Copy link
Copy Markdown
Contributor Author

@selul I have fixed the string with the latest commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants