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'.
This commit is contained in:
Chris Bracken 2019-01-10 16:05:39 -08:00 committed by GitHub
parent 7022f981e2
commit 17d741ea4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));
}