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)
Socorro Graveyard
Middleware
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.
| Reporter | ||
Comment 1•12 years ago
|
||
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
Comment 2•12 years ago
|
||
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.
| Reporter | ||
Comment 3•12 years ago
|
||
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"
Comment 4•12 years ago
|
||
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
Comment 5•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/socorro-crashstats
https://github.com/mozilla/socorro-crashstats/commit/46250518dca097428f64fac2465ecb24c77c4678
bug 843730 - calling Bugs model API without signatures, r=rhelmer
Comment 6•12 years ago
|
||
PR for the second part:
https://github.com/mozilla/socorro-crashstats/pull/309
Comment 7•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/socorro-crashstats
https://github.com/mozilla/socorro-crashstats/commit/e1a58335abf759ed47cb99cb724322c90bd86f97
bug 843730 - no signatures no topcrasher widgets, r=rhelmer
Comment 8•12 years ago
|
||
:stephend please QA now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 9•12 years ago
|
||
Thanks, LGTM on https://crash-stats-django.allizom.org/topcrasher/products/B2G/versions/19.0a2
Verified FIXED.
Status: RESOLVED → VERIFIED
| Assignee | ||
Updated•9 years ago
|
Product: Socorro → Socorro Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•