Remove Document from VulcanServerError

This commit is contained in:
Mikołaj Pich 2024-05-15 07:46:56 +02:00
parent 29a1dc73f7
commit de2a887188
No known key found for this signature in database
3 changed files with 1 additions and 5 deletions

View file

@ -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
}

View file

@ -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)

View file

@ -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 {