fix(chromium): increase the scope of loading failed errors (#962)

This commit is contained in:
Julien Neuhart
2024-09-07 15:54:01 +02:00
committed by GitHub
parent 300e73f07d
commit a3647fea8a
6 changed files with 60 additions and 31 deletions

View File

@@ -688,12 +688,12 @@ func handleChromiumError(err error, options Options) error {
)
}
if errors.Is(err, ErrConnectionRefused) {
if errors.Is(err, ErrLoadingFailed) {
return api.WrapError(
err,
api.NewSentinelHttpError(
http.StatusBadRequest,
"Chromium returned net::ERR_CONNECTION_REFUSED",
fmt.Sprintf("Chromium returned %v", err),
),
)
}