Improve logging of raw rest actions on failure
Log the method and the path.
This commit is contained in:
parent
3f3fa59406
commit
b7d02fbd1e
|
@ -129,7 +129,11 @@ public class DoSection implements ExecutableSection {
|
|||
}
|
||||
|
||||
private String formatStatusCodeMessage(RestResponse restResponse, String expected) {
|
||||
return "expected [" + expected + "] status code but api [" + apiCallSection.getApi() + "] returned ["
|
||||
String api = apiCallSection.getApi();
|
||||
if ("raw".equals(api)) {
|
||||
api += "[method=" + apiCallSection.getParams().get("method") + " path=" + apiCallSection.getParams().get("path") + "]";
|
||||
}
|
||||
return "expected [" + expected + "] status code but api [" + api + "] returned ["
|
||||
+ restResponse.getStatusCode() + " " + restResponse.getReasonPhrase() + "] [" + restResponse.getBodyAsString() + "]";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue