mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 21:35:47 +03:00
Exxtract the exception message from reply to PUT
Might be usefull to debug Internal Server Error Fixes #1366
This commit is contained in:
parent
98d7ff5116
commit
38344589c4
1 changed files with 9 additions and 1 deletions
|
@ -191,8 +191,16 @@ void PropagateUploadFileQNAM::slotPutFinished()
|
|||
"It is restored and your edit is in the conflict file."))) {
|
||||
return;
|
||||
}
|
||||
QString errorString = job->reply()->errorString();
|
||||
|
||||
done(classifyError(err, _item._httpErrorCode) , job->reply()->errorString());
|
||||
QByteArray replyContent = job->reply()->readAll();
|
||||
qDebug() << replyContent; // display the XML error in the debug
|
||||
QRegExp rx("<s:message>(.*)</s:message>"); // Issue #1366: display server exception
|
||||
if (rx.indexIn(QString::fromUtf8(replyContent)) != -1) {
|
||||
errorString += QLatin1String(" (") + rx.cap(1) + QLatin1Char(')');
|
||||
}
|
||||
|
||||
done(classifyError(err, _item._httpErrorCode), errorString);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue