rbutil: Show HTTP error string on download failure.

Also show the error string, which usually is more helpful than just
showing the HTTP error code.

Change-Id: I0652d240147c0f64a7a9ea58765af9eb197a03b1
This commit is contained in:
Dominik Riebeling 2020-11-13 22:02:28 +01:00
parent aaa9a2ccee
commit 440083af87

View file

@ -110,8 +110,9 @@ void ZipInstaller::downloadDone(bool error)
emit logProgress(1, 1);
if(m_getter->httpResponse() != 200 && !m_getter->isCached()) {
emit logItem(tr("Download error: received HTTP error %1.")
.arg(m_getter->httpResponse()),LOGERROR);
emit logItem(tr("Download error: received HTTP error %1\n%2")
.arg(m_getter->httpResponse()).arg(m_getter->errorString()),
LOGERROR);
emit done(true);
return;
}