mirror of
https://github.com/MontFerret/ferret.git
synced 2025-08-13 19:52:52 +02:00
Close a tab on every error (#359)
This commit is contained in:
@@ -195,10 +195,14 @@ func LoadHTMLPage(
|
||||
repl, err := client.Page.Navigate(ctx, page.NewNavigateArgs(params.URL))
|
||||
|
||||
if err != nil {
|
||||
handleLoadError(logger, client)
|
||||
|
||||
return nil, errors.Wrap(err, "failed to load the page")
|
||||
}
|
||||
|
||||
if repl.ErrorText != nil {
|
||||
handleLoadError(logger, client)
|
||||
|
||||
return nil, errors.Wrapf(errors.New(*repl.ErrorText), "failed to load the page: %s", params.URL)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user