if (status == 200) {
try {
URL logs = HttpUtil.toURL(new String(bytes));
return new LogStreamResponse(logs);
} catch (RuntimeException e) {
throw new RequestFailedException(e.getMessage(), status, bytes);
}
} else {
throw new RequestFailedException("Unable to get logs", status, bytes);
}
}