Closed Bug 843730 Opened 12 years ago Closed 12 years ago

[traceback] TypeError: __init__() got an unexpected keyword argument 'message' - Throwing a 500 Error for topcrasher/products/B2G/versions/19.0a2

Categories

(Socorro Graveyard :: Middleware, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Unassigned)

References

()

Details

Sorry, I don't have the stack for this, but https://crash-stats-django.allizom.org/topcrasher/products/B2G/versions/19.0a2 throws a 500. We'll adjust the summary once we haz stack.
Thu Feb 21 11:34:42 2013] [error] TypeError: __init__() got an unexpected keyword argument 'message' [Thu Feb 21 12:01:25 2013] [error] Traceback (most recent call last): [Thu Feb 21 12:01:25 2013] [error] File "/data/socorro/thirdparty/web/application.py", line 237, in process [Thu Feb 21 12:01:25 2013] [error] return self.handle() [Thu Feb 21 12:01:25 2013] [error] File "/data/socorro/thirdparty/web/application.py", line 228, in handle [Thu Feb 21 12:01:25 2013] [error] return self._delegate(fn, self.fvars, args) [Thu Feb 21 12:01:25 2013] [error] File "/data/socorro/thirdparty/web/application.py", line 394, in _delegate [Thu Feb 21 12:01:25 2013] [error] return handle_class(f) [Thu Feb 21 12:01:25 2013] [error] File "/data/socorro/thirdparty/web/application.py", line 385, in handle_class [Thu Feb 21 12:01:25 2013] [error] return tocall(*args) [Thu Feb 21 12:01:25 2013] [error] File "/data/socorro/application/socorro/webapi/webapiService.py", line 108, in POST [Thu Feb 21 12:01:25 2013] [error] raise web.webapi.BadRequest(message=str(e)) [Thu Feb 21 12:01:25 2013] [error] TypeError: __init__() got an unexpected keyword argument 'message'
Summary: [traceback] Throwing a 500 Error for topcrasher/products/B2G/versions/19.0a2 → [traceback] TypeError: __init__() got an unexpected keyword argument 'message' - Throwing a 500 Error for topcrasher/products/B2G/versions/19.0a2
As far as I know the only time we POST to the middleware is when we try to fetch bugs related. The middleware tries to raise a 400 error but fails on that so it breaks. For what it's worth, there is no 19.0a2 in the versions dropdowns on a page like https://crash-stats-django.allizom.org/topcrasher/products/B2G/versions/21.0a1?days=7 It's quite alarming that our webapi isn't able to return 400 Bad Request errors.
Specific steps the automation does to reach that URL: 1. Load https://crash-stats-django.allizom.org/home/products/Firefox 2. Choose "B2G" from the "Product" dropdown 3. From the "Report" dropdown, choose "Top Crashers"
What I suspect is that the django app is calling this: class Bugs(SocorroMiddleware): def get(self, signatures): url = '/bugs/' payload = {'signatures': signatures} return self.post(url, payload) With `signatures` being an empty list. Because in webapiService.py around line 107 it does this:: except MissingOrBadArgumentError, e: raise web.webapi.BadRequest(message=str(e)) But you can't pass a message to `web.webapi.BadRequest` with a parameter `message`. If you look at socorro/external/postgresql/bugs.py around like 29 you have this:: def post(self, **kwargs): """Return a list of signature - bug id associations. """ params = external_common.parse_arguments(self.filters, kwargs) if not params.signatures: raise MissingOrBadArgumentError( "Mandatory parameter 'signatures' is missing or empty") I made this to at least tighten up the nasty error. https://github.com/mozilla/socorro-crashstats/pull/302
:stephend please QA now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Socorro → Socorro Graveyard
You need to log in before you can comment on or make changes to this bug.