Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Raise error so 404 is triggered when URL is wrong #92

Merged
merged 3 commits into from
Jul 1, 2020

Conversation

hartsick
Copy link
Collaborator

@hartsick hartsick commented Jul 1, 2020

Record.find_by_x doesn't raise an ActiveRecord::RecordNotFound error,
which triggers the 404, so our app was returning a 500 error when
incorrect district URLs were accessed. (e.g. /d/san-francisco-sdf). This
should protect against that (but only in hosted environments)

We could still use a nice 404 page—right now we use the Rails default.

#80

Record.find_by_x doesn't raise an ActiveRecord::RecordNotFound error,
which triggers the 404, so our app was returning a 500 error when
incorrect district URLs were accessed. (e.g. /d/san-francisco-sdf). This
should protect against that (but only in hosted environments)
@hartsick hartsick temporarily deployed to reinvest-sit-404-missin-ciqetg July 1, 2020 05:25 Inactive
@hartsick hartsick merged commit d7512f1 into master Jul 1, 2020
@hartsick hartsick deleted the 404-missing-district branch July 1, 2020 05:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant