From de2a887188bcfdae19ca2afd91a9a2eec47f3728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Wed, 15 May 2024 07:46:56 +0200 Subject: [PATCH] Remove Document from VulcanServerError --- sdk-scrapper/api/sdk-scrapper.api | 1 - .../wulkanowy/sdk/scrapper/exception/VulcanServerError.kt | 3 --- .../wulkanowy/sdk/scrapper/interceptor/ErrorInterceptor.kt | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sdk-scrapper/api/sdk-scrapper.api b/sdk-scrapper/api/sdk-scrapper.api index 7dfee538..438f9e79 100644 --- a/sdk-scrapper/api/sdk-scrapper.api +++ b/sdk-scrapper/api/sdk-scrapper.api @@ -442,7 +442,6 @@ public class io/github/wulkanowy/sdk/scrapper/exception/VulcanException : io/git } public final class io/github/wulkanowy/sdk/scrapper/exception/VulcanServerError : io/github/wulkanowy/sdk/scrapper/exception/VulcanException { - public final fun getDoc ()Lorg/jsoup/nodes/Document; public final fun getHttpCode ()I } diff --git a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/exception/VulcanServerError.kt b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/exception/VulcanServerError.kt index b2c16b35..8d278587 100644 --- a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/exception/VulcanServerError.kt +++ b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/exception/VulcanServerError.kt @@ -1,9 +1,6 @@ package io.github.wulkanowy.sdk.scrapper.exception -import org.jsoup.nodes.Document - class VulcanServerError internal constructor( message: String, - val doc: Document, val httpCode: Int, ) : VulcanException(message) diff --git a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/interceptor/ErrorInterceptor.kt b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/interceptor/ErrorInterceptor.kt index 055dbc47..f8b338be 100644 --- a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/interceptor/ErrorInterceptor.kt +++ b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/interceptor/ErrorInterceptor.kt @@ -92,7 +92,7 @@ internal class ErrorInterceptor( } when (doc.title()) { - "Błąd" -> throw VulcanServerError(doc.body().text(), doc, httpCode) + "Błąd" -> throw VulcanServerError(doc.body().text(), httpCode) "Błąd strony" -> throw VulcanException(doc.select(".errorMessage").text(), httpCode) "Logowanie" -> throw AccountPermissionException( buildString {