diff options
author | cyBerta <cyberta@riseup.net> | 2021-02-18 12:28:27 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-02-18 12:28:27 +0100 |
commit | 4b916a189f2f88425ebf5d09bb6b7ba3568836e1 (patch) | |
tree | fdb77747bcea1640108d26ffa6aec6e2b0f72369 /app/src/main/java/se/leap/bitmaskclient/eip | |
parent | efd90a35caf042d7955727e4a5d9a12927714ca8 (diff) |
add a lot of API related error logs to log screen
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/eip')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/EIP.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java index e5cf70be..66b7c6cf 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java @@ -352,11 +352,14 @@ public final class EIP extends JobIntentService implements Observer { void setErrorResult(Bundle result, String errorId, @StringRes int errorMessageId, Object... args) { JSONObject errorJson = new JSONObject(); try { + String errorMessage; if (args != null) { - errorJson.put(ERRORS, getResources().getString(errorMessageId, args)); + errorMessage = getResources().getString(errorMessageId, args); } else { - errorJson.put(ERRORS, getResources().getString(errorMessageId)); + errorMessage = getResources().getString(errorMessageId); } + VpnStatus.logWarning("[EIP] error: " + errorMessage); + errorJson.put(ERRORS, errorMessage); errorJson.put(ERRORID, errorId); } catch (JSONException e) { e.printStackTrace(); |