From b7bcb96fdcd34b7d73b3b353a935fcaa345ebbd6 Mon Sep 17 00:00:00 2001 From: Synced Synapse Date: Mon, 20 Nov 2023 18:52:34 +0000 Subject: [PATCH] Improve message shown when errors occur sending an Http request The message will be seen by the user, so it should be clear. Ideally it shouldn't be done this way, as it can't be translated because there's no context to get the translated string, but it's what possible for now. --- app/src/main/java/org/xbmc/kore/host/HostConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/xbmc/kore/host/HostConnection.java b/app/src/main/java/org/xbmc/kore/host/HostConnection.java index 25fb407ad..06d756abf 100644 --- a/app/src/main/java/org/xbmc/kore/host/HostConnection.java +++ b/app/src/main/java/org/xbmc/kore/host/HostConnection.java @@ -510,8 +510,8 @@ private void executeThroughOkHttp(final ApiMethod method, final ApiCallba LogUtils.LOGD(TAG, "Illegal argument exception on sending HTTP request: " + e); // This happens because the host URL isn't valid if (callback != null) { - String desc = "Illegal argument exception on sending HTTP request: " + e.getMessage() + - ". Please check the media center URL."; + String desc = "Illegal argument exception on sending HTTP request.\n" + + "Please check the media center address on the configuration screen."; postOrRunNow(handler, () -> callback.onError(ApiException.HTTP_HOST_URL_INVALID, desc)); } }