Unverified Commit 17d741ea authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Emit more of HTTP error response bodies (#26395)

80 characters was short enough that after the XML boilerplate in the
response, all we got was 'The'.
parent 7022f981
......@@ -37,7 +37,7 @@ Future<Archive> fetchArchive(String url, int maxTries) async {
stderr.writeln('Failed attempt ${i+1} to fetch $url.');
// On failure print a short snipped from the body in case it's helpful.
final int bodyLength = min(80, response.body.length);
final int bodyLength = min(1024, response.body.length);
stderr.writeln('Response status code ${response.statusCode}. Body: ' + response.body.substring(0, bodyLength));
sleep(const Duration(seconds: 1));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment