Comment 8 for bug 1599114

Revision history for this message
Zane Bitter (zaneb) wrote :

I think the real problem is that we raise InvalidTemplateAttribute in StackResource regardless of whether the error is the key not existing or an error resolving the output:

http://git.openstack.org/cgit/openstack/heat/tree/heat/engine/resources/stack_resource.py?h=stable%2Fnewton#n593

In the latter case that's clearly the wrong exception. (a) because InvalidTemplateAttribute means that you accessed an attribute that doesn't exist, so it tells the user the wrong thing, and (b) because InvalidTemplateAttribute doesn't allow you to specify a reason, so the error message gets lost. If we raised a useful exception containing the error message there then the user would get the right feedback without any change in behaviour.