Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

404 instead of 500s for bad calls in eRegs #385

Closed
LindsayYoung opened this issue Mar 15, 2018 · 9 comments
Closed

404 instead of 500s for bad calls in eRegs #385

LindsayYoung opened this issue Mar 15, 2018 · 9 comments
Assignees
Milestone

Comments

@LindsayYoung
Copy link
Contributor

This came up in scanning. I think there should be a way add some resolve or 404 logic with django

@AmyKort AmyKort added this to the Sprint 5.3 milestone Mar 16, 2018
@PaulClark2 PaulClark2 modified the milestones: Sprint 5.3, Sprint 5.4 Mar 20, 2018
@AmyKort AmyKort changed the title 404 instead of 500s for bad calls 404 instead of 500s for bad calls in eRegs Apr 3, 2018
@AmyKort
Copy link

AmyKort commented Apr 3, 2018

@ccostino

@ccostino
Copy link
Contributor

ccostino commented Apr 4, 2018

I caught up with @LindsayYoung and what we're after here is updating the URL resolution (routing) to go through the e-regs application itself instead of the proxy app/router right now. What this means is making sure the e-regs application has the routes setup to handle these URLs if it doesn't already, and possibly updating some view logic to make use of Django's get_object_or_404() method.

@ccostino
Copy link
Contributor

These 500 errors may also be related to eregs/regulations-site#485 - I'm seeing a lot of these in the logs recently.

@ccostino
Copy link
Contributor

This issue will need to be fixed in https://github.com/eregs/regulations-site, not here.

@PaulClark2 PaulClark2 removed this from the Sprint 5.5 milestone Apr 24, 2018
@ccostino
Copy link
Contributor

Seeing as how this is something that has to be done in the core eregs platform, all we should have to do once this is addressed is update the dependency for regulations-site to the new version once it's available.

@ccostino
Copy link
Contributor

ccostino commented May 1, 2018

Unfortunately there is no one staffed to eregs at the moment, but we can help ourselves here and coordinate with folks at 18F who are in the know about it! The issue to address this is here: eregs/regulations-site#485 - if someone is able to take a look at this, we could probably get a PR in place to fix the issue and have someone merge it into the underlying eregs regulations-site module. :-)

@ccostino
Copy link
Contributor

ccostino commented May 1, 2018

Specifically, the fix here will be just to update the module once the fix is made in https://github.com/eregs/regulations-site - for details on the fix, please see the ticket associated with it: eregs/regulations-site#485

@AmyKort AmyKort modified the milestones: Sprint 5.6, Sprint 6.1 May 8, 2018
lbeaufort added a commit to lbeaufort/regulations-site that referenced this issue May 14, 2018
- Addresses issue eregs#485: Missing data leads to an explosion
- Also addresses FEC issue: fecgov/fec-eregs#385

- Throw a 404 error when navigating to a regulation that doesn't exist
- Previously, the `utils.regulation_meta` function was returning `{}`, so accessing the 'meta' data was resulting in a 500 error
@lbeaufort lbeaufort self-assigned this May 14, 2018
@lbeaufort
Copy link
Member

Update: The PR to eregs (eregs/regulations-site#515) was merged. Once there's a new release, we need to update our requirements.txt (https://github.com/fecgov/fec-eregs/blob/develop/requirements.txt#L22) with the new regulation-site version here: https://github.com/eregs/regulations-site/blob/master/setup.py#L6

lbeaufort added a commit that referenced this issue May 15, 2018
- New version 8.4.2 now throws 404 errors instead of 500 errors for missing regulations (eregs/regulations-site#515)
- This will address fec-eregs #385: 404 instead of 500 for missing regulations
lbeaufort added a commit that referenced this issue May 15, 2018
- New version 8.4.2 now throws 404 errors instead of 500 errors for missing regulations (eregs/regulations-site#515)
- This will address fec-eregs #385: 404 instead of 500 for missing regulations
@lbeaufort
Copy link
Member

Addressed by #405

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants