mirror of
https://github.com/MontFerret/ferret.git
synced 2025-08-15 20:02:56 +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))
|
repl, err := client.Page.Navigate(ctx, page.NewNavigateArgs(params.URL))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
handleLoadError(logger, client)
|
||||||
|
|
||||||
return nil, errors.Wrap(err, "failed to load the page")
|
return nil, errors.Wrap(err, "failed to load the page")
|
||||||
}
|
}
|
||||||
|
|
||||||
if repl.ErrorText != nil {
|
if repl.ErrorText != nil {
|
||||||
|
handleLoadError(logger, client)
|
||||||
|
|
||||||
return nil, errors.Wrapf(errors.New(*repl.ErrorText), "failed to load the page: %s", params.URL)
|
return nil, errors.Wrapf(errors.New(*repl.ErrorText), "failed to load the page: %s", params.URL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user