aboutsummaryrefslogtreecommitdiffstats
path: root/src/m_key_server_sync/VKSInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/m_key_server_sync/VKSInterface.cpp')
-rw-r--r--src/m_key_server_sync/VKSInterface.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/m_key_server_sync/VKSInterface.cpp b/src/m_key_server_sync/VKSInterface.cpp
index 006729c..5bceb6a 100644
--- a/src/m_key_server_sync/VKSInterface.cpp
+++ b/src/m_key_server_sync/VKSInterface.cpp
@@ -41,6 +41,7 @@
#include <QUrlQuery>
#include "GFModule.h"
+#include "KeyServerBatchLogic.h"
namespace {
/// Matches the HKP side; without it a stalled server hangs the caller forever.
@@ -144,7 +145,12 @@ void VKSInterface::RequestVerify(const QString& token,
void VKSInterface::on_reply_finished(QNetworkReply* reply) {
if (reply->error() != QNetworkReply::NoError) {
- emit SignalErrorOccurred(reply->errorString(), reply->readAll());
+ // A 404 from a lookup is an answer, not a failure: the server has no
+ // such key. Said plainly, rather than as Qt's transfer error.
+ const auto error = reply->error() == QNetworkReply::ContentNotFoundError
+ ? KeyServerBatchLogic::NotFoundText()
+ : reply->errorString();
+ emit SignalErrorOccurred(error, reply->readAll());
reply->deleteLater();
return;
}