From ccb6e184cc95451bc993cf9f3ad6e34aaef86573 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 24 Dec 2020 11:42:06 +0100 Subject: [PATCH] Fix issue #151 --- .../app/fedilab/fedilabtube/client/RetrofitPeertubeAPI.java | 3 +++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/app/fedilab/fedilabtube/client/RetrofitPeertubeAPI.java b/app/src/main/java/app/fedilab/fedilabtube/client/RetrofitPeertubeAPI.java index 9efa9ab..927db40 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/client/RetrofitPeertubeAPI.java +++ b/app/src/main/java/app/fedilab/fedilabtube/client/RetrofitPeertubeAPI.java @@ -1619,6 +1619,9 @@ public class RetrofitPeertubeAPI { error.setStatusCode(responseCode); error.setError(_context.getString(R.string.toast_error)); } + if (responseCode == 404 || responseCode == 502) { + error.setError(_context.getString(R.string.instance_not_availabe)); + } apiResponse.setError(error); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7442cb7..fe124cd 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -446,4 +446,5 @@ Live This live has not started! Account from another network! + Instance is not available! \ No newline at end of file