Skip to content

Commit edd2ed4

Browse files
Jake ChampionJakeChampion
authored andcommitted
if test fails, attempt to print out the respobse body
1 parent 5c514b8 commit edd2ed4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

integration-tests/js-compute/compare-downstream-response.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import compareHeaders from './compare-headers.js';
1515
export async function compareDownstreamResponse (configResponse, actualResponse) {
1616
// Status
1717
if (configResponse.status != actualResponse.statusCode) {
18+
try {
19+
let downstreamBodyText = await actualResponse.body.text();
20+
console.error({downstreamBodyText})
21+
} catch { /* empty */ }
1822
throw new Error(`[DownstreamResponse: Status mismatch] Expected: ${configResponse.status} - Got: ${actualResponse.status}`);
1923
}
2024

0 commit comments

Comments
 (0)