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:
@@ -37,7 +37,7 @@ Future<Archive> fetchArchive(String url, int maxTries) async {
|
|||||||
stderr.writeln('Failed attempt ${i+1} to fetch $url.');
|
stderr.writeln('Failed attempt ${i+1} to fetch $url.');
|
||||||
|
|
||||||
// On failure print a short snipped from the body in case it's helpful.
|
// 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));
|
stderr.writeln('Response status code ${response.statusCode}. Body: ' + response.body.substring(0, bodyLength));
|
||||||
sleep(const Duration(seconds: 1));
|
sleep(const Duration(seconds: 1));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user