Skip to content

fix 500 error caused by non-nil-safe user access - #2183

Merged
Oaphi merged 1 commit into
developfrom
cellio/500-mod-warning
Dec 2, 2026
Merged

Oaphi merged 1 commit into
developfrom
cellio/500-mod-warning

Conversation

@cellio

@cellio cellio commented Dec 2, 2026

Copy link
Copy Markdown
Member

We've gotten some 500 errors in the error log for URLs like https://powerusers.codidact.com/warning from anonymous users. This is because of a check for the community user of the current user, which wasn't nil-safe. Now it is.

I believe this URL is only meaningful if you are signed in and have a current mod warning pending. Otherwise it's 404, and with this fix it's 404 for anonymous users too.

@cellio
cellio requested a review from Oaphi December 2, 2026 04:44
@codecov

codecov Bot commented Dec 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.26%. Comparing base (6f57aa3) to head (43bec8c).

Additional details and impacted files
Components Coverage Δ
controllers 78.12% <ø> (ø)
helpers 85.62% <ø> (-0.47%) ⬇️
jobs 79.93% <ø> (ø)
models 93.56% <100.00%> (ø)
tasks 61.11% <ø> (ø)
scripts ∅ <ø> (∅)
initializers ∅ <ø> (∅)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Oaphi
Oaphi merged commit 7324c76 into develop Dec 2, 2026
14 checks passed
@Oaphi
Oaphi deleted the cellio/500-mod-warning branch December 2, 2026 18:48
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.

2 participants