[TEST] fix possible NPE in ClientYamlTestExecutionContext

This commit is contained in:
Simon Willnauer 2016-09-02 10:07:58 +02:00
parent 724e8ec39c
commit 825b80f2a6

View File

@ -75,8 +75,10 @@ public class ClientYamlTestExecutionContext {
response = e.getRestTestResponse();
throw e;
} finally {
// if we hit a bad exception the response is null
Object repsponseBody = response != null ? response.getBody() : null;
//we always stash the last response body
stash.stashValue("body", response.getBody());
stash.stashValue("body", repsponseBody);
}
}