Skip to content

chore: remove error_log() debug calls (closes #21)#45

Merged
payown merged 1 commit into
mainfrom
chore/issue-21-error-log
Jun 16, 2026
Merged

chore: remove error_log() debug calls (closes #21)#45
payown merged 1 commit into
mainfrom
chore/issue-21-error-log

Conversation

@payown

@payown payown commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Phase 5. Closes #21.

Removed the three error_log() calls in OUTPOST_Feed_Fetcher::fetch_from_api(). They ran unconditionally in production and tripped WordPress.PHP.DevelopmentFunctions. The method already returns WP_Error with the message and callers fall back to stale cache, so behavior is unchanged.

PHPCS exit 0, 22/22 tests pass.

Closes #21

🤖 Generated with Claude Code

The three error_log() calls in fetch_from_api() ran unconditionally in
production and tripped WordPress.PHP.DevelopmentFunctions. The method already
returns WP_Error with the message, and callers handle it with stale-cache
fallback, so behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 16, 2026 17:22
@payown payown merged commit b867485 into main Jun 16, 2026
@payown payown deleted the chore/issue-21-error-log branch June 16, 2026 17:23

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

Removes unconditional error_log() debug output from the Mastodon feed fetcher to satisfy Plugin Check/PHPCS (WordPress.PHP.DevelopmentFunctions) while keeping the existing WP_Error-based failure behavior used for stale-cache fallback.

Changes:

  • Removed error_log() calls on HTTP request failure, non-200 responses, and JSON decode failure in OUTPOST_Feed_Fetcher::fetch_from_api().
  • Simplified the non-200 response path by inlining the error message into the returned WP_Error.

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: remove or guard error_log() debug calls in the feed fetcher

2 participants