diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
index d6504c977..dd185e22b 100644
--- a/.idea/kotlinc.xml
+++ b/.idea/kotlinc.xml
@@ -4,6 +4,6 @@
-
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index b6caf610d..3a96f422b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -123,8 +123,8 @@ dependencies {
implementation 'androidx.hilt:hilt-work:1.0.0'
kapt 'androidx.hilt:hilt-compiler:1.0.0'
- implementation 'io.coil-kt:coil-base:2.2.1'
- implementation 'io.coil-kt:coil-svg:2.2.1'
+ implementation 'io.coil-kt:coil-base:2.2.2'
+ implementation 'io.coil-kt:coil-svg:2.2.2'
implementation 'com.github.KotatsuApp:subsampling-scale-image-view:0ff0278f0f'
implementation 'com.github.solkin:disk-lru-cache:1.4'
@@ -134,7 +134,7 @@ dependencies {
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
testImplementation 'junit:junit:4.13.2'
- testImplementation 'org.json:json:20220320'
+ testImplementation 'org.json:json:20220924'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4'
androidTestImplementation 'androidx.test:runner:1.4.0'
diff --git a/app/src/main/java/org/koitharu/kotatsu/utils/ext/ThrowableExt.kt b/app/src/main/java/org/koitharu/kotatsu/utils/ext/ThrowableExt.kt
index 9057a6cc4..e1f235652 100644
--- a/app/src/main/java/org/koitharu/kotatsu/utils/ext/ThrowableExt.kt
+++ b/app/src/main/java/org/koitharu/kotatsu/utils/ext/ThrowableExt.kt
@@ -8,6 +8,7 @@ import okio.FileNotFoundException
import okio.IOException
import org.acra.ktx.sendWithAcra
import org.json.JSONException
+import org.jsoup.HttpStatusException
import org.koitharu.kotatsu.R
import org.koitharu.kotatsu.core.exceptions.CaughtException
import org.koitharu.kotatsu.core.exceptions.CloudFlareProtectedException
@@ -45,6 +46,12 @@ fun Throwable.getDisplayMessage(resources: Resources): String = when (this) {
is WrongPasswordException -> resources.getString(R.string.wrong_password)
is NotFoundException -> resources.getString(R.string.not_found_404)
+
+ is HttpStatusException -> when (statusCode) {
+ in 500..599 -> resources.getString(R.string.server_error, statusCode)
+ else -> localizedMessage
+ }
+
is IOException -> getDisplayMessage(message, resources) ?: localizedMessage
else -> localizedMessage
} ?: resources.getString(R.string.error_occurred)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 407cb7f37..dd35152c6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -395,4 +395,5 @@
Different languages
Network is not available
Turn on Wi-Fi or mobile network to read manga online
+ Server side error (%1$d). Please try again later
diff --git a/build.gradle b/build.gradle
index 61f163ff5..0f59129a3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,8 +5,8 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.3.0'
- classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10'
+ classpath 'com.android.tools.build:gradle:7.3.1'
+ classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20'
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.44'
// NOTE: Do not place your application dependencies here; they belong