Skip to content

Commit

Permalink
Add API documentation for the error properties and types
Browse files Browse the repository at this point in the history
  • Loading branch information
jayohms committed Feb 26, 2024
1 parent b07ccbc commit 11bf873
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 11bf873

Please sign in to comment.