Open Vaibhav2002 opened 1 month ago
val webviewState = rememberWebViewState(url = "https://www.suyambu.net")
LaunchedEffect(webviewState.errorsForCurrentRequest.toList()) {
for (err in webviewState.errorsForCurrentRequest) {
println("Err => ${err.code} | ${err.description}")
}
}
I disconnected my internet and try to load the page I got the following output.
Err => -106 | Failed to load url: https://www.suyambu.net
ERR_INTERNET_DISCONNECTED
errorForCurrentRequest is updating the list from this function
I don't see any listener that I can bind to webviewstate or navigator tol listen for page load error.
@Vaibhav2002 Thanks for your feedback. I apologize for the confusion. Unfortunately, we do not provide an onError callback for this library, despite the comment being copied over from the Android version. As a result, the only way to access error information is by listening to errorsForCurrentRequest
, as @whoisjeeva has done. I'm sorry for any inconvenience this may have caused.
How can i add error handling only for the main page load?
This is the current errors exposed, which says to use OnError callback, but how to pass this callback?