ValueError causes 500 to return to client
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Invalid
|
Undecided
|
Unassigned | ||
WSME |
Fix Released
|
Undecided
|
Stéphane Bisinger |
Bug Description
At present the input json validation in WSME causes a 500 to be thrown to the client. It should ideally throw a 400 - input error in case of validation failures. Here is the relevant stack trace. This is from ceilometer API when invoked with the following command
ceilometer -vd sample-create -r 123 -m storage.objects --meter-type gauge --meter-unit object --sample-volume 10 --timestamp 1415702780
2014-11-13 17:05:51.215 8166 ERROR wsme.api [-] Server-side error: "year is out of range". Detail:
Traceback (most recent call last):
File "/usr/local/
pecan.
File "/usr/local/
from_body = args_from_
File "/usr/local/
body, datatypes, bodyarg=
File "/usr/local/
kw = {argname: fromjson(
File "/usr/local/
return f(*args, **kw)
File "/usr/local/
return [fromjson(
File "/usr/local/
return f(*args, **kw)
File "/usr/local/
val_fromjson = fromjson(
File "/usr/local/
return f[1](*args, **kw)
File "/usr/local/
return wsme.utils.
File "/usr/local/
return dateutil.
File "/usr/lib/
return DEFAULTPARSER.
File "/usr/lib/
ret = default.
ValueError: year is out of range
10.0.0.15 - - [13/Nov/2014 17:05:51] "POST /v2/meters/
Changed in wsme: | |
assignee: | nobody → Stéphane Bisinger (kjir) |
status: | New → In Progress |
Changed in ceilometer: | |
status: | New → Invalid |
Changed in wsme: | |
milestone: | none → 0.8.0 |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/177026
Review: https:/