diff --git a/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt b/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt index 240f64a92..4cbb34812 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt @@ -143,4 +143,11 @@ fun decodeFromJsonResponse( } } +/** + * Exception that handles HTTP codes considered not successful by OkHttp. + * Use it to have a standardized error message in the app across the extensions. + * + * @since extensions-lib 1.5 + * @param code [Int] the HTTP status code + */ class HttpException(val code: Int) : IllegalStateException("HTTP error $code")