Closed Bug 1504324 Opened 7 years ago Closed 7 years ago

[traceback] "TypeError: issubclass() arg 1 must be a class" in API machinery

Categories

(Socorro :: Webapp, task, P3)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

Details

Attachments

(1 file)

https://sentry.prod.mozaws.net/operations/socorro-new-prod/issues/4906705/ """ TypeError: issubclass() arg 1 must be a class File "django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "django/views/decorators/csrf.py", line 58, in wrapped_view return view_func(*args, **kwargs) File "ratelimit/decorators.py", line 30, in _wrapped return fn(*args, **kw) File "crashstats/crashstats/decorators.py", line 109, in inner response = view(request, *args, **kwargs) File "crashstats/crashstats/utils.py", line 443, in wrapper response = f(request, *args, **kw) File "crashstats/crashstats/utils.py", line 56, in wrapper response = f(request, *args, **kw) File "crashstats/api/views.py", line 180, in model_wrapper if model is None or not is_valid_model_class(model): File "crashstats/api/views.py", line 147, in is_valid_model_class issubclass(model, models.SocorroMiddleware) and """ "model" here is the supersearch Python module because they went to /api/supersearch/ (lowercase) instead of /api/Supersearch/ . I think we should fix "is_valid_model_class" to check a pre-generated list of models and not do a bunch of potentially fail-heavy computery. This covers that work.
Making this a P3. It's good to do, but it's not a big deal.
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: