[Trivial Fix] Add document layer to error message output
The document layer that is invalid should be included in the exception called InvalidDocumentLayer for obvious reasons. Change-Id: Ie7fcecc96bc7667530959af34ec146b4e4a47303
This commit is contained in:
parent
113365f552
commit
99ab93727b
deckhand
@ -303,6 +303,7 @@ class DocumentLayering(object):
|
||||
document.schema, document.name,
|
||||
self._layering_policy.layer_order)
|
||||
raise errors.InvalidDocumentLayer(
|
||||
document_layer=document.layer,
|
||||
document_schema=document.schema,
|
||||
document_name=document.name,
|
||||
layer_order=', '.join(
|
||||
|
@ -187,9 +187,10 @@ class InvalidDocumentLayer(DeckhandException):
|
||||
* Check that the document layer is contained in the layerOrder in the
|
||||
registered LayeringPolicy in the system.
|
||||
"""
|
||||
msg_fmt = ("Invalid layer for document [%(document_schema)s] "
|
||||
"%(document_name)s was not found in layerOrder %(layer_order)s "
|
||||
"for provided LayeringPolicy %(layering_policy_name)s.")
|
||||
msg_fmt = ("Invalid layer '%(document_layer)s' for document "
|
||||
"[%(document_schema)s] %(document_name)s was not found in "
|
||||
"layerOrder: %(layer_order)s for provided LayeringPolicy: "
|
||||
"%(layering_policy_name)s.")
|
||||
code = 400
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user