Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer returns ActiveRecord::NotFoundError for static entries #575

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

skelz0r
Copy link
Member

@skelz0r skelz0r commented Dec 2, 2024

With an exception ActiveRecord::NotFoundError raised, rails handles this error within the controller as a 404 error, which seems legit for these kinds of error.

However, with static content like forms, if we remove or rename/change forms we don't want to have a 404 error but a 500 error if it happens (better not to have error ofc, but best case is to catch it and fix it)

@skelz0r skelz0r self-assigned this Dec 2, 2024
@skelz0r
Copy link
Member Author

skelz0r commented Dec 2, 2024

@skelz0r
Copy link
Member Author

skelz0r commented Dec 2, 2024

bon.. ça casse tout, pas ouf

With an exception `ActiveRecord::NotFoundError` raised, rails handles
this error within the controller as a 404 error, which seems legit for
these kinds of error.

However, with static content like forms, if we remove or rename/change
forms we don't want to have a 404 error but a 500 error if it happens
(better not to have error ofc, but best case is to catch it and fix it)
@skelz0r skelz0r force-pushed the harden/static-content-not-found branch from 560d13f to 8e2aed4 Compare December 2, 2024 13:02
@skelz0r
Copy link
Member Author

skelz0r commented Dec 2, 2024

bon, c'était trivial à ficxer

Copy link
Contributor

@JeSuisUnCaillou JeSuisUnCaillou left a comment

Choose a reason for hiding this comment

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

seems legit

@skelz0r
Copy link
Member Author

skelz0r commented Dec 2, 2024

is it indeed

@skelz0r skelz0r merged commit e7f0e82 into develop Dec 2, 2024
12 checks passed
@skelz0r skelz0r deleted the harden/static-content-not-found branch December 2, 2024 14:44
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