Skip to content

fix: Sentry に 404 エラーをレポートしないようフィルタリング#241

Merged
coji merged 1 commit intomainfrom
fix/sentry-filter-404
Mar 23, 2026
Merged

fix: Sentry に 404 エラーをレポートしないようフィルタリング#241
coji merged 1 commit intomainfrom
fix/sentry-filter-404

Conversation

@coji
Copy link
Owner

@coji coji commented Mar 23, 2026

Summary

  • ボット・脆弱性スキャナーが存在しない URL(.php 等)にアクセスした際の 404 が Sentry にノイズとして報告されていた問題を修正
  • entry.server.tsxhandleErrorResponse status 404 をフィルタリング

Test plan

  • pnpm validate pass
  • Sentry に 404 エラーが新たに報告されないことを確認

🤖 Generated with Claude Code

Summary by CodeRabbit

リリースノート

  • Bug Fixes
    • 404エラーのエラーレポート処理を最適化しました。これにより、エラーログの精度が向上し、重要なエラーへの対応がより効率的になります。

ボット・脆弱性スキャナーが存在しない URL (.php 等) にアクセスした際の
404 が Sentry にノイズとして報告されていた問題を修正。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0afe801c-2365-49f3-aa4b-d7deb1e68227

📥 Commits

Reviewing files that changed from the base of the PR and between 5c8ac1f and bf03fa7.

📒 Files selected for processing (1)
  • app/entry.server.tsx

📝 Walkthrough

Walkthrough

app/entry.server.tsxのエラーハンドリングを修正し、Sentryのエラーハンドラーを条件付きラッパーで囲みました。404レスポンスエラーの場合はSentryへのレポートを抑制し、その他のエラーは従来通りSentryに報告します。

Changes

Cohort / File(s) Summary
Error Handling Wrapper
app/entry.server.tsx
新しいhandleErrorエクスポートを追加し、404ステータスのResponseエラーに対するSentryレポートを条件付きで抑制。内部的にsentryHandleErrorに他のエラーを転送。型付けはSentryハンドラーシグネチャと一致するよう調整。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 ピョン、ピョン、404も仲間だね
Sentryよ、優しく見守りて
エラーハンドラー、より賢く
バグぬし、安心ぴょん! 🌟

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sentry-filter-404

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coji coji merged commit 8d0c3ae into main Mar 23, 2026
6 checks passed
@coji coji deleted the fix/sentry-filter-404 branch March 23, 2026 06:23
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.

1 participant