Merge pull request #1438 from open-keychain/upload-error

Check upload response code and throw AddKeyException
This commit is contained in:
Dominik Schürmann
2015-07-13 12:13:53 +02:00

View File

@@ -399,6 +399,10 @@ public class HkpKeyserver extends Keyserver {
Log.d(Constants.TAG, "response code: " + response.code());
Log.d(Constants.TAG, "answer: " + response.body().string());
if (response.code() != 200) {
throw new AddKeyException();
}
} catch (IOException e) {
Log.e(Constants.TAG, "IOException", e);
throw new AddKeyException();