diff --git a/turbo/src/main/kotlin/dev/hotwire/turbo/visit/TurboVisitError.kt b/turbo/src/main/kotlin/dev/hotwire/turbo/visit/TurboVisitError.kt index b7fe7539..c0b44ce5 100644 --- a/turbo/src/main/kotlin/dev/hotwire/turbo/visit/TurboVisitError.kt +++ b/turbo/src/main/kotlin/dev/hotwire/turbo/visit/TurboVisitError.kt @@ -2,17 +2,17 @@ package dev.hotwire.turbo.visit data class TurboVisitError( /** - * + * The [TurboVisitErrorType] type of error received. */ val type: TurboVisitErrorType, /** - * + * The error code associated with the [TurboVisitErrorType] type. */ val code: Int, /** - * + * The (optional) description of the error. */ val description: String? = null ) diff --git a/turbo/src/main/kotlin/dev/hotwire/turbo/visit/TurboVisitErrorType.kt b/turbo/src/main/kotlin/dev/hotwire/turbo/visit/TurboVisitErrorType.kt index be03f125..602a8fba 100644 --- a/turbo/src/main/kotlin/dev/hotwire/turbo/visit/TurboVisitErrorType.kt +++ b/turbo/src/main/kotlin/dev/hotwire/turbo/visit/TurboVisitErrorType.kt @@ -2,22 +2,28 @@ package dev.hotwire.turbo.visit enum class TurboVisitErrorType { /** - * + * Represents an error when Turbo and the javascript adapter fails to + * load on the page. */ LOAD_ERROR, /** - * + * Represents an error received from your server with an HTTP status code. + * The code corresponds to the status code received from your server. */ HTTP_ERROR, /** - * + * Represents an [androidx.webkit.WebResourceErrorCompat] error received + * from the WebView when attempting to load the page. The code corresponds + * to one of the ERROR_* constants in [androidx.webkit.WebViewClientCompat]. */ WEB_RESOURCE_ERROR, /** - * + * Represents an [android.net.http.SslError] error received from the WebView + * when attempting to load the page. The code corresponds to one of the + * SSL_* constants in [android.net.http.SslError]. */ WEB_SSL_ERROR }