heat-api validate template method returns 500 and stacktrace when json parser fails

Bug #1102391 reported by konrad-k
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Zane Bitter
Grizzly
Fix Released
Medium
Zane Bitter

Bug Description

When I call template validate method on heat rest api: POST "/v1/{tenant_id}/validate"
and "template" parameter is a not a valid json
then 500 with stacktrace is returned.

I would expect to return the response which indicates that the template is invalid, instead of internal application error code.

Affected version is the version with commit id: e098963e8617d32909795c9b389dee848b637636.

Zane Bitter (zaneb)
Changed in heat:
importance: Undecided → Medium
assignee: nobody → Zane Bitter (zaneb)
status: New → In Progress
Zane Bitter (zaneb)
Changed in heat:
milestone: none → grizzly-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/20141

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/20141
Committed: http://github.com/openstack/heat/commit/8a572c0b887a58df9bace67d567337a08ba3af18
Submitter: Jenkins
Branch: master

commit 8a572c0b887a58df9bace67d567337a08ba3af18
Author: Zane Bitter <email address hidden>
Date: Mon Jan 21 16:36:21 2013 +0100

    ReST API: Return 400 for malformed JSON input

    Previously we had an unhandled exception that resulted in a 500 (Internal
    Server Error) result and a stack trace when an invalid JSON file was
    submitted in a POST/PUT request. Change to catching the exception and
    returning a 400 (Bad Request) result.

    bug 1102391

    Change-Id: I7dde33ae732d9addbf988b1d36d4f06eacb634bf
    Signed-off-by: Zane Bitter <email address hidden>

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: grizzly-3 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.