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

Accessing nonexistent reg causes 500 error, not 404 #525

Open
lbeaufort opened this issue Aug 25, 2020 · 0 comments
Open

Accessing nonexistent reg causes 500 error, not 404 #525

lbeaufort opened this issue Aug 25, 2020 · 0 comments

Comments

@lbeaufort
Copy link
Member

From the logs

https://dev.fec.gov/regulations/400-22/CURRENT
Server error

   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT ERROR:django.request:Internal Server Error: /regulations/400-22/CURRENT
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT Traceback (most recent call last):
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT   File "/home/vcap/deps/0/python/lib/python3.7/site-packages/django/core/handlers/exception.py", line 41, in inner
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT     response = get_response(request)
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT   File "/home/vcap/deps/0/python/lib/python3.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT     response = self._get_response(request)
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT   File "/home/vcap/deps/0/python/lib/python3.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT     response = self.process_exception_by_middleware(e, request)
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT   File "/home/vcap/deps/0/python/lib/python3.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT     response = wrapped_callback(request, *callback_args, **callback_kwargs)
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT   File "/home/vcap/deps/0/src/regulations/regulations/views/redirect.py", line 49, in redirect_by_current_date
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT     return redirect_by_date_str(request, label_id, date.today().isoformat())
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT   File "/home/vcap/deps/0/src/regulations/regulations/views/redirect.py", line 17, in redirect_by_date_str
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT     for struct in client.regversions(label_id.split('-')[0])['versions']:
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT TypeError: 'NoneType' object is not subscriptable
   2020-08-25T11:53:02.68-0400 [APP/PROC/WEB/0] OUT 10.255.169.50 - - [25/Aug/2020:11:53:02 -0400] "GET /regulations/400-22/CURRENT HTTP/1.1" 500 27 "-" "Amazon CloudFront"

https://dev.fec.gov/regulations/200-22/CURRENT gets 404

@lbeaufort lbeaufort added the Bug label Aug 25, 2020
@lbeaufort lbeaufort changed the title Accessing nonexistant reg causes 500 error, not 404 Accessing nonexistent reg causes 500 error, not 404 Aug 25, 2020
@lbeaufort lbeaufort self-assigned this Nov 20, 2020
@lbeaufort lbeaufort added this to the Sprint 13.8 milestone Nov 20, 2020
@lbeaufort lbeaufort removed their assignment Nov 20, 2020
@lbeaufort lbeaufort removed this from the Sprint 13.8 milestone Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: No status
Development

No branches or pull requests

2 participants