Comment 6 for bug 1195925

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/grizzly)

Reviewed: https://review.openstack.org/39477
Committed: http://github.com/openstack/ceilometer/commit/c51bfc29752ef1d4080149f0ed8cce5f3cb22129
Submitter: Jenkins
Branch: stable/grizzly

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"}"}

    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: I73c73fb3ba57bc6cbbf421f9ac5ec3cdb68ce784
    (cherry picked from commit fbb1eb9285c7787f8508d3f69790522ff6847fc8)