commit c51bfc29752ef1d4080149f0ed8cce5f3cb22129
Author: Fei Long Wang <email address hidden>
Date: Mon Jul 1 16:12:03 2013 +0800
Fix return error when resource can't be found
By current implement, the HTTP request for /v2/resources/<resource_id>
will return 500 if there is no coresponding resource or the resource id
is invalid. And the response is as below:
{"error_message": "{"debuginfo": null, "faultcode": "Server",
"faultstring": "list index out of range"}"}
Reviewed: https:/ /review. openstack. org/39477 github. com/openstack/ ceilometer/ commit/ c51bfc29752ef1d 4080149f0ed8cce 5f3cb22129
Committed: http://
Submitter: Jenkins
Branch: stable/grizzly
commit c51bfc29752ef1d 4080149f0ed8cce 5f3cb22129
Author: Fei Long Wang <email address hidden>
Date: Mon Jul 1 16:12:03 2013 +0800
Fix return error when resource can't be found
By current implement, the HTTP request for /v2/resources/ <resource_ id>
will return 500 if there is no coresponding resource or the resource id
is invalid. And the response is as below:
{"error_ message" : "{"debuginfo": null, "faultcode": "Server",
"faultstring": "list index out of range"}"}
After fixed, the response will be like this:
{"error_ message" : "{"debuginfo": null, "faultcode": "Client",
"faultstring": "Invalid input for field/attribute resource_id.
Value: '9'. Unknown resource"}"}
Fixes bug: 1195925
Change-Id: I73c73fb3ba57bc 6cbbf421f9ac5ec 3cdb68ce784 f8508d3f6979052 2ff6847fc8)
(cherry picked from commit fbb1eb9285c7787