diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/ConnectionException.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/ConnectionException.java index 3611cb16..b1da4c5e 100644 --- a/app/src/main/java/org/nuclearfog/twidda/backend/api/ConnectionException.java +++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/ConnectionException.java @@ -96,6 +96,11 @@ public abstract class ConnectionException extends Exception { */ public static final int HTTP_FORBIDDEN = 15; + /** + * + */ + public static final int INVALID_DATA = 16; + /** * invalid media (wrong format, size) */ diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/mastodon/MastodonException.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/mastodon/MastodonException.java index 8e67a064..72ac1dfe 100644 --- a/app/src/main/java/org/nuclearfog/twidda/backend/api/mastodon/MastodonException.java +++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/mastodon/MastodonException.java @@ -79,6 +79,10 @@ public class MastodonException extends ConnectionException { errorCode = HTTP_FORBIDDEN; break; + case 422: + errorCode = INVALID_DATA; + break; + case 429: errorCode = RATE_LIMIT_EX; break; diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/async/LoginAction.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/LoginAction.java index f319f348..c27ca7d3 100644 --- a/app/src/main/java/org/nuclearfog/twidda/backend/async/LoginAction.java +++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/LoginAction.java @@ -16,7 +16,6 @@ import org.nuclearfog.twidda.config.GlobalSettings; import org.nuclearfog.twidda.database.AppDatabase; import org.nuclearfog.twidda.model.Account; import org.nuclearfog.twidda.model.Instance; -import org.nuclearfog.twidda.model.WebPush; import org.nuclearfog.twidda.ui.activities.LoginActivity; /** @@ -67,14 +66,11 @@ public class LoginAction extends AsyncExecutorFollow-Anfrage annehmen? Follow-Anfrage angenommen öffentl. Timeline + API Fehler \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 62e75b96..44c9902c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -123,6 +123,7 @@ Invalid media file! Not specified error! API does not support this operation! + API error Error occurred while adding media! Error while preparing media files for upload! Could not translate status