fromResponse static method
Implementation
static Future<COSException> fromResponse(HttpClientResponse? res) async {
try {
final body = await res?.transform(utf8.decoder).join();
final status = res?.statusCode;
return COSException(message: 'statusCode: $status\n\n$body');
} catch (e) {
return COSException(message: 'unknown exception: $e');
}
}