1
0
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:
Tim Voronov
2019-08-24 20:25:15 -04:00
committed by GitHub
parent b855f203e6
commit 70b17ce755

View File

@@ -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)
}