fix(chromium): fail fast with 503 when Chromium crashes (#1641)

This commit is contained in:
Muhammad Haseeb
2026-08-31 19:48:21 +05:00
committed by GitHub
parent 923e5f71eb
commit 7dbff18e65
7 changed files with 154 additions and 0 deletions

View File

@@ -1020,6 +1020,16 @@ func handleChromiumError(err error, options Options) error {
return nil
}
if errors.Is(err, ErrChromiumCrashed) {
return api.WrapError(
err,
api.NewSentinelHttpError(
http.StatusServiceUnavailable,
"Chromium crashed while processing the request. Retry, or reduce the workload if the problem persists.",
),
)
}
if errors.Is(err, ErrInvalidEvaluationExpression) {
if options.WaitForExpression == "" {
// We do not expect the 'waitWindowStatus' form field to return