fix
This commit is contained in:
@@ -55,12 +55,15 @@ public class RnpayProxyService extends BaseProxyService {
|
||||
try (Response resp = HTTP.newCall(req).execute()) {
|
||||
String respBody = resp.body() != null ? resp.body().string() : "";
|
||||
JSONObject json = new JSONObject(respBody);
|
||||
Log.i(TAG,"Http result => " + json.toString());
|
||||
if (!json.optBoolean("success", false)) {
|
||||
throw new IOException(json.optString("message", "register failed"));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.i(TAG,"POST IOException => " + e.getMessage());
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
Log.i(TAG,"POST Exception => " + e.getMessage());
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user