1e6a07c5fc
For 4xx errors Placement sends back a complex JSON object describing the error. When turned into an exception that becomes a non-trivial attribute of the error object. Usual ways of logging an exception (that is LOG.exception) completely ignore that attribute, therefore the real error message is not logged. For example we only logged the fact that we received a BadRequest response and nothing else while Placement did provide a whole lot more detail. Here we dig out that error detail and re-throw a better exception with it. Change-Id: Id97116c1c298f54f898a746d6e3c96b1f412bb49 Related-Bug: #1578989
9 lines
357 B
YAML
9 lines
357 B
YAML
---
|
|
other:
|
|
- |
|
|
The Placement client previously swallowed a few exceptions (but logged
|
|
a warning when doing this). In order to let the user of the client choose
|
|
to handle or ignore the error condition the client no longer does this.
|
|
Also to avoid losing error information we catch and re-throw HTTP 4xx
|
|
exceptions with better messages.
|