Fix AttributeError being raised in buckets controller

This PS fixes an AttributeError raised in buckets controller
when Deckhand tries to parse a malformed YAML which in turn
causes Deckhand to attempt to raise a 400, but accesses an
invalid attribute in the exception object, causing the
AttributeError.

Example error:

    AttributeError: 'ScannerError' object has no attribute 'format_message'

Change-Id: I54865e4830d3d34e813b1ecfa3105cf6243f2ca0
This commit is contained in:
Felipe Monteiro
2017-10-05 01:26:31 +01:00
parent 5e6b0bfe5c
commit 6e2a8adcf5
6 changed files with 85 additions and 11 deletions

View File

@@ -0,0 +1,7 @@
---
fixes:
- |
Deckhand will no longer throw an ``AttributeError`` after a
``yaml.scanner.ScannerError`` is raised when attempting to parse a
malformed YAML document. Deckhand should now correctly raise a
"400 Bad Request" instead.