check response code for upload error

This commit is contained in:
Adithya Abraham Philip
2015-07-10 22:38:23 +05:30
parent 47c07aa320
commit 06091dffa9

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();