Skip to content

Commit

Permalink
Improve message shown when errors occur sending an Http request (#992)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SyncedSynapse committed Nov 20, 2023
1 parent 751039e commit 0724097
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/org/xbmc/kore/host/HostConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ private <T> void executeThroughOkHttp(final ApiMethod<T> 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));
}
}
Expand Down

0 comments on commit 0724097

Please sign in to comment.